Select to view content in your preferred language

Application admin settings for DefaultBasemapJson using JSON or CIM Path

146
2
Jump to solution
2 weeks ago
BryanMc
Occasional Contributor

We creating a default Pro.settingsConfig file for staff which is going well. However, one that we can't sort out is the DefaultBasemapJson setting in the Map and Scene Settings section .

The help describes setting this as being: Blank, 'FromPortal' (default), or by providing a "JSON object or CIM path corresponding to a custom basemap".

We would like to set a custom basemap that is hosted externally from portal/AGOL (but does meet the esri vector tile requirements). Does anyone have an example of setting this JSON/CIM syntax in the config XML file?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
GIS_Weasel
New Contributor III

I've just been looking at doing the same thing.

You can find a compliant json object a couple of ways, but the most useful appears to be using ago-assistant.

The json appears to be formatted in the same schema as you'd find by opening a Web Map in ago-assistant, therefore open your chosen web map you want to use as a basemap (and not necessarily one from your organisational basemap gallery) in ago-assistant, copy the 'Data' section into Pro.settingsConfig and it should work. A simple example below.

 

{
    "operationalLayers": [],
    "baseMap": {
        "baseMapLayers": [
            {
                "id": "VectorTile_7608",
                "type": "VectorTileLayer",
                "layerType": "VectorTileLayer",
                "title": "GB Light Grey",
                "styleUrl": "https://www.arcgis.com/sharing/rest/content/items/85a1e870f04c40e7b8e24fdb66430d4e/resources/styles/root.json",
                "itemId": "85a1e870f04c40e7b8e24fdb66430d4e",
                "visibility": true,
                "opacity": 1
            }
        ],
        "title": "GB Light Grey"
    },
    "spatialReference": {
        "wkid": 27700,
        "latestWkid": 27700
    },
    "authoringApp": "WebMapViewer",
    "authoringAppVersion": "9.2",
    "version": "2.20"
}

 

You can also confirm the json schema by digging through the registry - choose the basemap whose json config you want to investigate in the regular options dialog in Pro, and you can find the schema in the local settings cache (user.config).

The file you need is named here: HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro\Settings\UserConfigLocalRoaming

Open the user.config file referenced, and you'll find the XML element DefaultBasemapJson contains the configured basemap you set in options in its JSON format. Obviously that is an org default which isn't what you asked for, so you'll probably want to go straight to ago-assistant.

This method of deducing the correct syntax for a given value is mentioned for some of the options on the https://pro.arcgis.com/en/pro-app/latest/get-started/administrator-settings-list.htm page, but not specifically for DefaultBasemapJson.

Caveat with 'should' because this is all trial and error on my part. I have no idea how to configure it with a CIM path as alluded to in the documentation, or whether the json schema is actually the same, or just close enough to work.

View solution in original post

0 Kudos
2 Replies
GIS_Weasel
New Contributor III

I've just been looking at doing the same thing.

You can find a compliant json object a couple of ways, but the most useful appears to be using ago-assistant.

The json appears to be formatted in the same schema as you'd find by opening a Web Map in ago-assistant, therefore open your chosen web map you want to use as a basemap (and not necessarily one from your organisational basemap gallery) in ago-assistant, copy the 'Data' section into Pro.settingsConfig and it should work. A simple example below.

 

{
    "operationalLayers": [],
    "baseMap": {
        "baseMapLayers": [
            {
                "id": "VectorTile_7608",
                "type": "VectorTileLayer",
                "layerType": "VectorTileLayer",
                "title": "GB Light Grey",
                "styleUrl": "https://www.arcgis.com/sharing/rest/content/items/85a1e870f04c40e7b8e24fdb66430d4e/resources/styles/root.json",
                "itemId": "85a1e870f04c40e7b8e24fdb66430d4e",
                "visibility": true,
                "opacity": 1
            }
        ],
        "title": "GB Light Grey"
    },
    "spatialReference": {
        "wkid": 27700,
        "latestWkid": 27700
    },
    "authoringApp": "WebMapViewer",
    "authoringAppVersion": "9.2",
    "version": "2.20"
}

 

You can also confirm the json schema by digging through the registry - choose the basemap whose json config you want to investigate in the regular options dialog in Pro, and you can find the schema in the local settings cache (user.config).

The file you need is named here: HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro\Settings\UserConfigLocalRoaming

Open the user.config file referenced, and you'll find the XML element DefaultBasemapJson contains the configured basemap you set in options in its JSON format. Obviously that is an org default which isn't what you asked for, so you'll probably want to go straight to ago-assistant.

This method of deducing the correct syntax for a given value is mentioned for some of the options on the https://pro.arcgis.com/en/pro-app/latest/get-started/administrator-settings-list.htm page, but not specifically for DefaultBasemapJson.

Caveat with 'should' because this is all trial and error on my part. I have no idea how to configure it with a CIM path as alluded to in the documentation, or whether the json schema is actually the same, or just close enough to work.

0 Kudos
BryanMc
Occasional Contributor

Thank you @GIS_Weasel ! I made a map in AGOL with the one layer added as a basemap. Then went to ago-assistant and copied the data section as you mentioned. It worked!

I did some additional tests of the required JSON from that point, and the only part that is needed is below. Although that could change over time so recommend using what you mention or testing the minimum needed at different releases (I'm 3.3):

{"baseMapLayers": [
 {
   "type": "VectorTileLayer",
   "layerType": "VectorTileLayer",
   "title": "GB Light Grey",
   "styleUrl": "https://www.arcgis.com/sharing/rest/content/items/85a1e870f04c40e7b8e24fdb66430d4e/resources/styles/root.json"
  }
]}

 

0 Kudos