Using an existing Map Control in a questionnaire

Snap provides facilities for you to present questions to the respondent as clickable maps. The image used to form the structure of the map control can be a picture of anything – it is not limited to a cartographical map. Possibilities include:

  • map of a country, region or district split up into areas
  • schematic picture of a human body which may be used to indicate areas affected by injury or disease
  • photograph of a street scene with potentially hazardous situations marked.

Map Controls can be associated with single-response and multiple-response questions in electronic editions (Snap WebHost, web, kiosk, etc.) of the questionnaire.

This worksheet describes how to add a clickable map of US states into your questionnaire by inserting a supplied Map Control. It also describes how to create a map of UK counties, using a question from the reference library combined with one of the Map Controls supplied with Snap.

Background

A Map Control consists of any image which has had areas specified in the Map Control Editor. When a Map Control has been created in the Map Control Editor you can apply it to a multi-choice or grid question. You define the areas to click on, how they map to the question codes, and how the areas are highlighted when the respondent selects them.

Snap is distributed with some sample Map Controls. You can also create your own using the Map Control Editor within Snap or the standalone Map Control Editor found within the Snap Toolkit.

Summary of steps

Step 1: Creating a question from an existing Map Control

Step 2: Adding a question from a SurveyPak

Step 3: Associating the question with the Map Control

Step 1: Creating a question from an existing Map Control

  1. Click New button or [Enter] to add a new question to your questionnaire. By default, it will be displayed as a Multi choice or like Multi choice question. If it is not, change the style to Multi choice.
  2. Without making any changes to the question, choose the Show topic and select As Map Control.
  3. Click the Show checkbox.

    QW: undefined question displayed as map control

  4. Double-click the gray area or click the [Map control...] button to open the Map Control Editor window.

    IM: Empty dialog in Map Control Editor

  5. The dialog box is initially empty.
  6. Select the File | Load map control to find an existing Map Control. By default this opens the folder ImageMaps\Templates. This is the folder containing the Map Controls supplied by Snap.

    Select USstates.isf and click [Open]

    IM: MCE dialog showing UK map

    You will load a Map Control showing the US states, with each one drawn as a separate clickable area.

  7. Click the Variables window button button on the Map Control Editor toolbar to open the Variable codes dialog.

    IM: variable codes dialog US states

    These are the question codes that are supplied as default by the Map Control template. They have already been set up to link to the associated area on the map. These codes will be automatically added to your new question in place of the undefined codes.

    (This only works if you have not defined any codes for your question before you set up the Map Control.)

  8. If you wish to change a text label, double-click on the label and edit it. When you have finished, click [OK] to return to the Map Control Editor window.
  9. Click on an area to see which question code it maps to. It is displayed at the bottom left of the window.

    IM: US states map showing section with Texas selected in

  10. If the Map Control is the wrong size for your requirements, use the Size% box to adjust the size. This changes the size of the Map Control. The picture shows the map of states resized to 45% of its original size.

    You can inspect the details of the map more closely by using the Zoom box.

  11. Click the Preview tab and click on the states to see what they will look like when respondents are clicking on the published survey.

    IM: orevuew un MCE of US state map

  12. Click [OK] on the Map Control Editor window to return to the questionnaire.
  13. Edit the question text to something appropriate.

    QW: image map showing context menu

  14. Right-click the question and select Edit codes... from the context menu to open the Variable Codes dialog. You can confirm the question codes have been imported correctly from the Map Control template.

    This dialog allows you to change the code labels if you need to, as you cannot edit them directly in the questionnaire while the question is displayed as a Map Control.

    QW: Variable codes dialog showing US states

  15. Click [OK] to close the dialog.

Step 2: Adding a question from a SurveyPak

  1. Open the Reference window by clicking the Reference window button button of the main Snap toolbar. Close all other windows except for the Questionnaire window.
  2. Select Window | Tile so that the two windows are arranged side by side on the screen.
  3. Double-click on the Regions category in the snReference 2009 SurveyPak.

    RW: refence survey showing Regions questions

  4. Double click the UK Regions topic and select the Countries of the United Kingdom question.
  5. Drag the question from the SurveyPak into the questionnaire. As you drag the cursor over the questionnaire it changes from to one of these three alternatives:
    • insert the new question before this question.
    • replace this question with the new one.
    • insert the new question after this question.

    When you release the mouse button, the new question is dropped in the position indicated.

    QW: UK countries question

  6. Edit the question text as appropriate, leaving the codes and code names as they are.

Step 3: Associating the question with the Map Control

  1. Select the question you have just dragged in from the SurveyPak, choose the Show topic and select As Map Control.
  2. Click the Show checkbox.
  3. Double-click the gray area or click the [Map control...] button to open the Map Control Editor dialog.
  4. Select the File | Load map control and open the UKregions.isf Map Control template. A map of the UK appears in the Map Control Editor.
  5. You need to assign the separate areas on the map to the four UK countries. Select the areas of England. You can hold down [Ctrl] while selecting each one until they are all selected, or drag a box across them.

    IM: UK map with areas of England selected

  6. Right-click to open the context menu and select Assign to code, then select England. (You can also select Assign to code from the Shapes menu.)

    IM: assigning a code to England areas

  7. Some of the areas may already have been randomly assigned to the question codes. If so, you will be asked if you want to continue.

    IM: warning message about previously assigned code

    Click [Yes] and carry on.

  8. Assign the codes for Northern Ireland, Scotland, and Wales to the remaining areas.
  9. Click [OK] to save the Map Control and return to the questionnaire.
  10. Publish the questionnaire to test the Map Controls.

    SO: UK and US Map Controls in IE published HTML output

Conclusion

This worksheet has shown you how to create new questions from existing Map Controls and apply them to questions. You may also wish to read worksheet 54: Using a clickable map to create a star rating scale which explains how to change the way areas appear when the user clicks on them.

There are also instructions in the User Manual and the help file on creating your own Map Controls. Select the Help menu in the Map Control Editor or read the section on "Changing multi-choice questions to graphical elements" in the User Manual.

 

» View all worksheets