Toggle menu

ArcGIS Integration

The ArcGIS integration service lets you display map and data layers from your ArcGIS account in your forms. Users can then select points on the map and have them saved and submitted with the form.

Map of Parks

Creating Maps

To make fetching data from your ArcGIS account as simple as possible we have created a tool that generates a map definition for you. The map definition contains information about all of the things you'd like to retrieve from your ArcGIS account.

The map definition tool uses a set of End Points, one of which holds information about your map layers and other configuration. Once you have generated the map definition you can add a form snippet to any form, copy and paste in the map definition, and the map will appear.

ArcGIS Config

Configuration End Point

The configuration End Point holds information about the feature, tile and search layers you'd like to retrieve from ArcGIS. It also holds other configuration, like the default zoom level, query distance, and the area first shown when the map is loaded.

These defaults are passed to the map definition tool.

featureLayersArray of objectsEach object in this array defines a layer that should be returned. For example:
    legendTitle: "Bins",
    name: 'bins',
    url: 'https://.../rest/services/maps/MapServer/2',
    query: {
        fields: '"OBJECTID","BIN_TYPE"'
    popupTemplate: {
        title: 'Bin ID {ID}',
        content: '<p>This is a <em>{BIN_TYPE}</em> type bin, with an ID of <em>{ID}</em>.</p><p>Its emptying day(s) are <strong>{EMPTY_DAY}</strong>.</p><ul><li>x-coord: {expression/geometry-x}</li><li>y-coord: {expression/geometry-y}</li></ul>',
tileLayersArray of objectsEach object defines a tile layer of your base map. For example:
    name: 'baseMap',
    url: 'https://.../rest/services/World_Map/MapServer',
    query: {}
searchLayersArray of objectsCustom services and searchable layers to add to the search widget. For example:
    name: 'address',
    legendTitle: "Address",
    url: 'https://.../rest/services/maps/Administration1/MapServer/1',
    searchFields: ["ADDRESS"]
defaultFeatureLayersArray of stringsThe names of any feature layers that should be included in every map. For example:
defaultExtentObjectThe area displayed when the map first loads. For example:
    xmin: 50.426745,
    ymin: 50.359856,
    xmax: -4.060782,
    ymax: -4.222423,
    spatialReference: {
        wkid: 27700
defaultZoomLevelIntegerThe default zoom level
defaultQueryDistanceIntegerThe default query distance
defaultQueryUnitsStringThe default query units. See the ArcGIS documentation for more information. Examples include "feet", "miles", "meters" and "kilometers" (uses the American spellings)
queryDistanceArrayObjectOverride the default query distance and units at different zoom levels. For example:
    0: { distance: 10000, units: "feet" },
    1: { distance: 5000, units: "feet" },
    2: { distance: 2000, units: "feet" },
    3: { distance: 1000, units: "feet" },
    4: { distance: 500, units: "feet" },
    5: { distance: 250, units: "feet" },
    6: { distance: 100, units: "feet" },
    7: { distance: 50, units: "feet" },
    8: { distance: 20, units: "feet" },
    9: { distance: 10, units: "feet" },
    10: { distance: 5, units: "feet" },
    11: { distance: 3, units: "feet" },
    12: { distance: 1.5, units: "feet" }
showLocateBooleanWhether or not to show the "locate" button
minimumMarkerDistanceNumberIf a marker already exists on the map within this distance, don't create a new one
markerPopupsBooleanIf true markers placed by the user will generate popups when clicked

Map Definition Tool

The map tool exists so that you can quickly and easily choose the layers you would like to add to a map without having to edit End Points or interact directly with the ArcGIS API.

Page 1 - Pick Layers

The first page of the tool lists all of the feature layers defined in the End Point. Pick the layers you'd like to use.

Map Tool Layers

Page 2 - Copy the Map Definition

The second page shows an example of what your map will look like and a block of text you will need to copy. This block of text is the map definition. It contains all of the information needed to build the map.

Map Definition

Create Your Form

You can now create your own form. Add the "Display ArcGIS Snippet" to your form where you'd like the map to appear.

ArcGIS Snippet

The snippet contains five fields. Select the one called "ARCGISMAP":

ArcGIS Snippet Fields

The ARCGISMAP field is an HTML Template that will generate your map. Open the "Manipulation Function" and paste in the map definition you created earlier.

Map Function

You can now publish your form and check that the map appears. Users can search for locations, view popup information stored in your ArcGIS account, and select points on the map. When a point is selected its coordinates are stored in the hidden "X" and "Y" fields.

Last modified on January 11, 2023

Share this page

Facebook icon Twitter icon email icon


print icon