Available from: Axsy Mobile Inspection Suite managed package 10.6 and later


This article builds on Axsy Maps for Web, which describes the Maps tab, how map layers are configured and how users work with the map.


Alongside layers built from Salesforce records, the Maps tab of Axsy Maps for Web can display layers taken directly from an ArcGIS Feature Service. This could be council boundaries, zoning areas, asset networks or any other GIS data your organisation already publishes in ArcGIS Online or ArcGIS Enterprise.


ArcGIS layers are read-only. The features are loaded live from ArcGIS each time the map loads, are displayed alongside your Salesforce layers, and can be inspected by clicking on them. Nothing is written back to ArcGIS, and the ArcGIS data is not copied into Salesforce records.


NOTE: ArcGIS layers are displayed on the Maps tab only. They are not shown in the Axsy Maps Record Page or Axsy Maps Related List components, in the Axsy flow map components, or in the Map Layers view of the Axsy Mobile App.


Before You Begin

To configure an ArcGIS layer, you will need:

  1. Axsy Maps for Web set up, with the Axsy Maps Administrator permission set assigned to your user so that you can open Layer Settings. Users who view the map need the Axsy Maps Core permission set. See Axsy Maps for Web.
  2. The URL of an ArcGIS Feature Service layer. The URL must use HTTPS and end in /FeatureServer/ followed by the layer number, for example: https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/USA_States_Generalized_Boundaries/FeatureServer/0
  3. Permission for Salesforce to connect to the ArcGIS service. This is either a Remote Site Setting (for public services) or a Named Credential (for secured services). See Step 1.


TIP: To find a layer's URL, open the Feature Service in the ArcGIS REST Services Directory, click on the layer you want to display, and copy the URL from your browser's address bar. If you paste the service URL ending in /FeatureServer, Axsy Maps will automatically use layer 0.


Supported ArcGIS Layers


SupportedNot supported
Feature Layers in a FeatureServer that have the Query capabilityMapServer, ImageServer, vector tile and tile layers
ArcGIS Online and ArcGIS EnterpriseURLs using http:// rather than https://
Public layers, and secured layers accessed through a Named CredentialArcGIS Web Maps or Web Map item IDs (each layer is added individually by its URL)
Points, multi-points, lines and polygonsEditing ArcGIS features or attributes


Step 1: Allow Salesforce to Connect to the ArcGIS Service

Axsy Maps retrieves ArcGIS data on the Salesforce server, so Salesforce must be allowed to call out to the ArcGIS host. This connection is configured once per org by a Salesforce Administrator, and is not included in the Axsy managed package.


Public ArcGIS Services: Add a Remote Site Setting

For a public layer that does not need a login, add the ArcGIS host as a Remote Site Setting:

  1. Navigate to Setup > Security > Remote Site Settings and click New Remote Site.
  2. Enter a Remote Site Name, for example ArcGIS_Online_Services2.
  3. Enter the Remote Site URL. This is the host part of the layer URL only, for example https://services2.arcgis.com.
  4. Make sure Active is checked and click Save.


NOTE: ArcGIS Online services are spread across several hosts (for example services.arcgis.com, services2.arcgis.com, services7.arcgis.com). Add a Remote Site Setting for each host your layers use.


Secured ArcGIS Services: Use a Named Credential

For a layer that is not shared publicly, Axsy Maps connects with an ArcGIS API key held in a Salesforce External Credential. The key never appears in the Axsy Maps settings, map users do not need their own ArcGIS login, and no Remote Site Setting is needed.


  1. Create an API key in ArcGIS. Go to Content > My content > New item > Developer credentials > API key credentials. Skip the privileges step (reading layers needs none), and under item access select each private Feature Layer you want to display. Set an expiration date (one year at most), create the key and copy it. ArcGIS shows the key only once.
  2. Create the External Credential. In Setup > Named Credentials > External Credentials, click New. Enter the Label ArcGIS Layers, the Name ArcGIS_Layers, set Authentication Protocol to Custom, and click Save. Then:
    1. Under Principals, click New. Enter the Parameter Name ArcGIS_Key, Sequence Number 1 and Identity Type Named Principal.
    2. Under Authentication Parameters, click Add. Enter the Name ApiKey, paste the API key as the Value, and click Save.
  3. Create the Named Credential. In Setup > Named Credentials, click New (not New Legacy), enter the settings below and click Save.


SettingValue
URLThe Feature Service URL, up to and including /FeatureServer, without the layer number, for example https://services.arcgis.com/<org id>/arcgis/rest/services/<service name>/FeatureServer
External CredentialArcGIS Layers
Generate Authorization HeaderUnchecked
Allow Formulas in HTTP HeaderChecked
Allowed Namespaces for Calloutsaxsy_mobile


Then, under Custom Headers, click New, enter the Name X-Esri-Authorization and the Value Bearer {!$Credential.ArcGIS_Layers.ApiKey}, and click Save.


  1. Grant map users access. In a permission set held by everyone who views the map, open External Credential Principal Access and enable ArcGIS_Layers - ArcGIS_Key. Without this, the layer does not load for those users.


NOTE: If axsy_mobile is missing from Allowed Namespaces for Callouts, the layer fails with "The callout couldn't access the endpoint".


NOTE: Axsy Maps adds the layer number to the Named Credential's URL, so one Named Credential covers every layer in a Feature Service. Create one Named Credential per Feature Service; they can all share the same External Credential.


TIP: Create a separate API key for each Salesforce org (Production and each sandbox) so each can be revoked on its own. When a key expires, layers fail with ArcGIS error 498 or 499: create a new key in ArcGIS and replace the ApiKey value on the ArcGIS_Key principal. Nothing else needs to change.


Step 2: Add an ArcGIS Layer

  1. Open the Maps tab and click the Settings (cog) button to open the Layer Settings window.
  2. Click Add Layer.
  3. Change the Layer Type from SObject to ArcGIS.
  4. Paste the URL into the ArcGIS Layer URL field.
  5. If the layer is secured, select its Named Credential. Leave this blank for a public layer that uses a Remote Site Setting.
  6. Click Add. The button shows Checking... while Axsy Maps contacts ArcGIS to confirm the URL is a queryable Feature Layer. If the check fails, the reason is shown under the URL field (see Troubleshooting below).


When the check succeeds, the new layer is added to the Layers list with a globe icon, which identifies it as an ArcGIS layer. Its label defaults to the name of the layer in ArcGIS, and it is given a colour automatically.


Step 3: Configure the Layer

Select the ArcGIS layer in the Layers list to view its settings.


SettingDescription
Layer ColourThe colour used to draw the layer's features, and its icon in the key.
Layer LabelThe name shown for the layer in the map key. Defaults to the layer name from ArcGIS.
ArcGIS Layer URLThe Feature Service layer URL, ending in /FeatureServer/<n>. When this is changed, Axsy Maps checks the new URL as soon as you leave the field.
Named CredentialOptional. The Named Credential used to connect to a secured service. Leave blank to connect directly using a Remote Site Setting.
Render points as heatmapIf enabled, the layer's point features are drawn as a heat map rather than as individual points.
Heatmap Spread / Heatmap IntensityShown when the heat map is enabled. Adjust how far each point's heat spreads and how strongly it contributes.
Overwrite Create Record Settings for this LayerIf enabled, Create Record Here from this layer's features creates the object configured here instead of the object configured under General Settings.


NOTE: ArcGIS layers do not have the Data Sources or Default List View settings used by SObject layers. Every feature in the ArcGIS layer is displayed; filtering is not available.


When you have finished, click Save. Layer settings apply to all users of Axsy Maps in the org.


Working with ArcGIS Layers on the Map

ArcGIS layers load with the rest of the map. While a layer is loading, a spinner is shown next to its name in the map key.


Using the Map Key

ArcGIS layers are listed in the map key with a globe icon. The key's controls (show/hide, Zoom to Fit Layer, Download GeoJSON, Show Labels and Refresh All Layers) work in the same way as for other layers; see Axsy Maps for Web. ArcGIS layers do not have a list view selector. Refresh All Layers retrieves ArcGIS layers from ArcGIS again, and Download GeoJSON includes each feature's ArcGIS attributes.


Viewing Feature Details

Click any feature of an ArcGIS layer to open its popup. The popup shows:

  • A title, taken from the layer's display field in ArcGIS (for example, a state name). If the layer has no display field, the first attribute is used.
  • The feature's attributes, with the ArcGIS field name and its value. Date fields are shown as dates. The object ID field and the system Shape__Area and Shape__Length fields are not shown.


The title is a link labelled View feature in ArcGIS, which opens the feature's page in the ArcGIS REST Services Directory in a new browser tab.



Creating Salesforce Records from an ArcGIS Feature

Although the ArcGIS data cannot be edited, ArcGIS features can be used as a starting point for Salesforce records. Click the Actions button in a feature's popup and select Create Record Here to create a Salesforce record at that location. The object that is created is taken from the layer's Overwrite Create Record Settings for this Layer setting if enabled, otherwise from General Settings.



What Read-Only Means

  • Features and attributes cannot be edited, moved or deleted from Axsy Maps. Changes must be made in ArcGIS.
  • Axsy Maps only reads from the ArcGIS service. It never sends changes back to ArcGIS.
  • The ArcGIS data is not stored in Salesforce. It is retrieved again each time the map is opened or refreshed, so changes made in ArcGIS appear the next time the map loads.
  • ArcGIS layers require an internet connection and are not available offline.


Size Limits

Salesforce limits how much data can be retrieved in a single request. To keep large layers within these limits, Axsy Maps:

  • Simplifies the geometry of the features it retrieves. Shapes are slightly less detailed than in ArcGIS, which is not usually noticeable at normal zoom levels. If a layer is still too large, the geometry is simplified further and a message is shown in the map, for example: "<Layer>: geometry simplified to 0.006 degrees to fit the size limit."
  • Retrieves features in pages, using the page size set on the ArcGIS service, up to a total of approximately 1.2 million characters of data (or 20 pages). If the limit is reached before all features have been retrieved, the features retrieved so far are displayed and a message is shown: "<Layer>: loaded N pages before reaching the size limit; some features are not shown."


TIP: If a layer regularly reaches the size limit, consider publishing a lighter view of the data in ArcGIS (for example, with fewer fields or simplified shapes) and pointing Axsy Maps at that view.


Troubleshooting

MessageCause and resolution
Enter a Feature Service layer URL ending in /FeatureServer/<n>The URL is not a Feature Service layer URL. Check it uses https:// and ends in /FeatureServer/ followed by a layer number. MapServer URLs are not supported.
Salesforce blocked the callout to https://<host>. Add a Remote Site Setting for that host, or select a Named Credential on the layer.There is no Remote Site Setting for the ArcGIS host. Add one as described in Step 1.
<URL> is not a queryable Feature Layer (type ..., capabilities ...)The URL points to something other than a Feature Layer (for example a group layer or table), or the layer does not allow queries.
Named Credential "<name>" does not exist in this org.The selected Named Credential has been deleted or renamed. Select a valid Named Credential for the layer.
You do not have access to the Named Credential for this layer. Ask an admin to grant its External Credential principal in a permission set.The user viewing the map has not been given access to the External Credential's Principal.
ArcGIS returned HTTP <code> / ArcGIS error <code>: <message>ArcGIS rejected the request, for example because the service is unavailable or the credentials are invalid. Check the service in ArcGIS.
Layer "<Layer>" is too large to load through Salesforce even at reduced detailThe layer is too large to load even with simplified geometry. Publish a lighter view of the layer in ArcGIS.