sdi_loadservice

This bundle provides the functionality to display additional (preconfigured or custom) contents on the map. The widget role of the service loading dialog is sdi_loadservice.

Configuration Reference

Property Type Mandatory Default Description
addToBottom Boolean no false If true, a newly generated GroupLayer will be added to the bottom of the layers list, otherwise to the top. If loadServiceNodeId is set to an existing GroupLayer ID this parameter has no effect.
collapsingThreshold Number no 10 Defines the maximum amount of sublayers before the subtree will not be collapsed in the content selection step.
favorites Array no [] Defines a list of favorite map services, where each service entry has a name, a url, a type and a description (optional). If description is missing, the url will be displayed as description for the entry in the UI. You can organize the entries in categories. A category is an entry with a name and a children property. children must be an array containing the entries belonging to that category. Favorites can also be added through domain bundles. See the section Configure map service favorites in domain bundles for details.
hiddenInputTabs Array no [] Allows hiding of input tabs favorites or custom. If empty, all tabs are shown.
initialInputTab String no undefined Allows setting of initial active input tab. If given value is invalid the first tab will be active.
maxDescriptionCharacters Number no 125 Allows setting of maximum amount of characters in the description of favorite items. If the description length exceeds this length it will be cut and shortened by "...". Hovering over the description shows the whole description.
maxOGCFeatureCountPerQuery Number no 5000 Allows setting the maximum feature count to limit the number of features returned for a single query to a OGC Feature API.

The following sample shows how this configuration is adjusted in the app.json file:

{
  "sdi_loadservice": {
    "Config": {
      "addToBottom": true,
      "collapsingThreshold": 10,
      "hiddenInputTabs": [
        "custom"
      ],
      "initialInputTab": "favorites",
      "favorites": [
        {
          "name": "My category",
          "description": "Description for this category",
          "children": [
            {
              "name": "Vector tiles - World_Basemap_v2",
              "description": "Esri basemap World_Basemap_v2",
              "url": "https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer",
              "type": "AGS_VECTORTILE"
            }
          ]
        },
        {
          "name": "AGOL World Imagery",
          "description": " World Imagery provides one-meter or better satellite and aerial imagery in many parts of the world and lower-resolution satellite imagery worldwide.",
          "url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",
          "type": "AGS_DYNAMIC"
        }
      ]
    }
  }
}

Constraints

Use Cases

Configure map service favorites in domain bundles

If you have a lot of map service favorites configured (using the favorites property described above), managing those favorites might become hard and confusing. Alternatively, you can configure your favorite map services in separate domain bundles (see domains-system). Adding and removing map service from the favorites list can then be performed by adding and removing domain bundles to your apps. The different favorites will be merged into a single list in the load service dialog.

A domain bundle for this purpose consists of a single manifest.json file with the following content:

{
    "name": "domain-loadservice",
    "version": "1.0.0",
    "dependencies": {
        "domains-system": "^4.14.0"
    },
    "main": "",
    "layer": "",
    "i18n": [],
    "domain-config": {
        "load-service-favorites": [
            {
                "name": "The name of the service",
                "description": "Description for the service",
                "url": "http://www.mymapservice.de/some-service",
                "type": "WMTS"
            }
        ]
    }
}

Here, the map services are configured with the load-service-favorites in the exact same format as in the favorites property described in the table above.

You can assign an arbitrary name to the bundle (which is "domain-loadservice" in the example above). However, by convention domain bundles should have a prefix "domain", which makes it easy to distinguish them from other bundles in map.apps Manager.

Dynamically add layers via URL parameter

This bundle supports the parameter manager and allows encoding of a layer into the URL as parameter.

The syntax is defined as follows:

&add_layers=<type>:<url>[<ids>]

e.g. (not URL-encoded):

 add_layers=AGS_DYNAMIC:https://sampleserver6.arcgisonline.com/arcgis/rest/services/SampleWorldCities/MapServer[0,2]

For <type> insert any of the following service types: WMS, WMTS, WFS, AGS_DYNAMIC, AGS_FEATURE, INSPIRE_VIEW, OGC_FEATURE, AGS_SCENE, AGS_VECTORTILE

Special cases

WFS

To add single types of a WFS service to the map, use the typenames of the WFS for the list of <ids>. These must be URL encoded.

Example:

URL-encoded add_layers=WFS:https://ahocevar.com/geoserver/wfs%5Bne%3Ane_10m_admin_0_boundary_lines_land%5D

URL-decoded add_layers=WFS:https://ahocevar.com/geoserver/wfs[ne:ne_10m_admin_0_boundary_lines_land]