English

How To: Manually associate a shared map package to a survey

Summary

In ArcGIS Survey123, the recommended way to associate an offline map with a survey is to link a shared map package, but if required, you can also manually associate a shared map package to a survey by editing the survey's .info file. If you've already uploaded the survey to ArcGIS, you'll already have an .info file you can edit. If you haven't already uploaded your survey to ArcGIS, you can create an .info file with the following information. It is recommended to publish the survey once to generate this file.

Procedure

To associate a shared map package to your survey, complete the following steps:

  1. Browse to your survey folder on your computer.
  2. Open the MySurvey.info file in a text editor.

If you haven't already uploaded this survey to ArcGIS, this file does not exist. You can create a file called MySurvey.info, where MySurvey is the name of the survey. If the file already exists, when editing this file in the text editor, ensure that Survey123 Connect is closed. If Survey123 Connect is open, your edits may be lost when closing the text editor.

  1. Copy the following code snippet into this file, modifying the map sources section with your own shared map package name and URL, and select Save.

This snippet should be placed within the first layer of brackets in MySurvey.info.

"displayInfo": {
        "map": {
            "mapTypes": {
                "append": false,
                "includeLibrary": false,
                "mapSources": [
                    {
                        "name": "Imagery Basemap",
                        "url": "http://www.arcgis.com/home/item.html?id=4497b7bb42e543b691027840d1b9092a",
                        "storeInMapLibrary": false
                    }
                ]
            }
        }
    },

Your MySurvey.info file contents should now look something like this (note that your information under serviceInfo will be different):

{
    "displayInfo": {
        "map": {
            "mapTypes": {
                "append": false,
                "includeLibrary": false,
                "mapSources": [
                    {
                        "name": "Imagery Basemap",
                        "url": "http://www.arcgis.com/home/item.html?id=4497b7bb42e543b691027840d1b9092a",
                        "storeInMapLibrary": false
                    }
                ]
            }
        }
    },
    "serviceInfo": {
        "itemId": "7a0c8f6025ad4801b684a19682d6d037",
        "type": "Feature Service",
        "url": "http://services.arcgis.com/FQD0rKU8X5sAQfh8/arcgis/rest/services/service_922426e4ec964f26abf82c20ec8dd988/FeatureServer"
    }
}

It is critical that you ensure the syntax in this file is correct. It is recommended that you use a JSON validator tool to confirm this. An online example is JSONLint. Other properties can exist in your .info file, but only properties of displayInfo must be modified when associating map packages.

  1. Republish your survey to ArcGIS.

    The following are the optional properties you can define when managing map packages in your surveys:

    • append—When you set the append property to true, the user sees the list of default online basemaps with your map package appended at the bottom. When set to false, users only see the map packages defined in your MySurvey.info file. The default is true.
    • includeLibrary—When you set the includeLibrary property to true, all map packages stored on the device appear in the list of basemaps of the current survey. When set to false, only the basemaps (online or map packages) defined in the MySurvey.info file are listed. The default is true.
    • storeInMapLibrary—This is only relevant to map package basemap sources. It specifies whether the map package is stored in the basemap library or if it is exclusive to the survey. If includeLibrary is set to false, map packages are automatically stored privately, and this property is  ignored. The default is true.
  2. In the Survey123 field app, download (or redownload if you already have it on your device) the survey that now references the shared map package.

Last Published: 5/3/2021

Article ID: 000025484

Software: ArcGIS Survey123 3.9, 3.8, 3.7, 3.6, 3.5, 3.4, 3.3, 3.2, 3.12, 3.11, 3.10, 3.1, 3.0, 2.9.Classic, 2.8