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.
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.
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.
|featureLayers||Array of objects||Each object in this array defines a layer that should be returned. For example:|
|tileLayers||Array of objects||Each object defines a tile layer of your base map. For example:|
|searchLayers||Array of objects||Custom services and searchable layers to add to the search widget. For example:|
|defaultFeatureLayers||Array of strings||The names of any feature layers that should be included in every map. For example:|
|defaultExtent||Object||The area displayed when the map first loads. For example:|
|defaultZoomLevel||Integer||The default zoom level|
|defaultQueryDistance||Integer||The default query distance|
|defaultQueryUnits||String||The default query units. See the ArcGIS documentation for more information. Examples include |
|queryDistanceArray||Object||Override the default query distance and units at different zoom levels. For example:|
|showLocate||Boolean||Whether or not to show the "locate" button|
|minimumMarkerDistance||Number||If a marker already exists on the map within this distance, don't create a new one|
|markerPopups||Boolean||If 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.
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.
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.
The snippet contains five fields. Select the one called "ARCGISMAP":
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.
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.