Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

GISMapApp

Advanced interaction with map app

  • Last UpdatedFeb 19, 2025
  • 2 minute read

This section describes how to update layers and merge features in runtime.

  • For more information about merge and assetNameTemplate options, refer Feature layers.

  • For more information about Layers and UpdateLayers properties, refer Layers properties.

  • For more information about ShownAssets, AssetNameTemplate, and Features properties, refer Merge feature properties.

Merge features example

As an example, the Esri layers created in the Configure Layers sections is updated.

Esri Cities layer has features with a schema similar to the below:

[

{

"FID": 1522,

"OBJECTID": 518,

"CITY_NAME": "New York"

},

{

"FID": 478,

"OBJECTID": 478,

"CITY_NAME": "Toronto"

},

{CITY_NAME} will be used as assetNameTemplate for the Esri Cities layer.

Esri States layer has features with a schema similar to the below:

[

{

"OBJECTID": 17,

"STATE_NAME": "New York"

},

{

"OBJECTID": 26,

"STATE_NAME": "Ohio"

}

]

{STATE_NAME} will be used as assetNameTemplate for the Esri States layer.

Modify layers configuration

  1. Double click the GISMapApp in the imported app to open the editor.

    1. Select the "Esri Cities" layer and update the below options:

      1. Merge: true

      2. AssetNameTemplate: {CITY_NAME}

      1. Select the "Esri States" layer and update the below options:

        1. Merge: true

        2. AssetNameTemplate: {STATE_NAME}

        Esri Cities Esri States

        1. Save and close the GISMapApp editor.

      2. Deploy your view app.

      3. Launch OMI or OMI Web and explore how to update layers and merge features in runtime.

      Explore UpdateLayers property

      • Modify UpdateLayers properties to change some property of the existing layers.

        1. Hide layer

          [{"title":"Esri Cities","visible":false}]

        2. Show layer

          [{"title":"Esri Cities","visible":true}]

      Explore Merge features properties

      As the AssetNameTemplate has been configured, the CurrentAsset property displays the CITY_NAME or STATE_NAME when the asset is selected.

      The ShownAssets property has the assets loaded for the visible layers with merge enabled.

      Merge features properties

      Update the FeaturesLayer to merge the layer data.

      [{"Id":"New York","POP_RANK":10,"UOC_STATUS":1},{"Id":"Toronto","POP_RANK":5,"UOC_STATUS":2}]

      The feature "New York" in Esri cities layers and Esri States layers is updated with,

      • The existing "POP_RANK" value is updated.

      • A new property "UOC_STATUS" is created.

      New properties

      The feature "Toronto" will be updated in Esri cities.

      In This Topic
      TitleResults for “How to create a CRG?”Also Available in