Skip to content

imageOverlayGroups

andy.rothwell edited this page Aug 28, 2018 · 6 revisions

imageOverlayGroups Configuration

UNDER CONSTRUCTION

This one is not fully available to Mapboard apps yet.

If you want to include image overlay layers which are NOT included in the BasemapSelectControl, but are instead called by buttons in the topics panel, use an imageOverlayGroup.

Example:

1st create a datasource where the url is the image layer URL:

export default {
  id: 'regmaps',
  type: 'esri',
  url: '//services.arcgis.com/fLeGjb7u4uXqeF9q/arcgis/rest/services/MASTERMAPINDEX/FeatureServer/0',
  deps: ['parcels.dor'],
  ...

2nd, include the imageOverlayGroups object:

imageOverlayGroups: {
  regmaps: {
    items: function(state) {
      return state.sources.regmaps.data;
    }
  }
},

3rd, add the following to the topic that you want to control the image overlays from:

imageOverlayGroup: 'regmaps',

The part that has to be completed to make this flexible for other possible overlays is that this is hardcoded in MapPanel.vue:

<!-- regmaps -->
<esri-dynamic-map-layer v-for="(item, key) in this.imageOverlayItems"
                        v-if="shouldShowImageOverlay(item.properties.RECMAP)"
                        :key="key"
                        :url="'//gis.phila.gov/arcgis/rest/services/Atlas/RegMaps/MapServer'"
                        :layers="[0]"
                        :layerDefs="'0:NAME=\'g' + item.properties.RECMAP.toLowerCase() + '.tif\''"
                        :transparent="true"
                        :opacity="0.5"
/>
Clone this wiki locally