I'm wanting to create a really simple app with the following functionality:
- A map widget with two layers - a zones layer (polygon) and a monitoring sites layer (points).
- When you first access the app, I want it to show only show the zones layer.
- I then want to be able to click on a single polygon in the zones layer, for it to zoom to the extent of the polygon, for the zones layer to turn off and the monitoring sites layer to turn on.
- I then want to be able to click on a monitoring site point and see attribute information.
- Then when you zoom back out, the zones layer turns back on and the monitoring sites layer turns off.
This sounds simple enough but have run into the following limitations:
- I don't seem to be able to create an action triggered by selecting a feature if I only have one widget (the map widget). To get around this, I've followed the suggestion in this post to create a second map widget in the background and create a series of actions which zoom the background map based on a selection in the main map, the change the extent in the main map based on an extent change in the background map. Clunky but it works!
- I have applied visibility ranges to both of my layers in the map viewer, but this conflicts with the action to zoom to the feature. It won't seem to zoom to the selected zone if it results in a scale that is beyond the visibility range.
- I attempted to remove the visibility range on the zones layer and leave this as an outline, but when I try to select the monitoring sites point, it also selects the zones layer.
- Another issue I'm experiencing is I actually don't want the popup to appear on the zones layer. But when I disable it in the map viewer, it doesn't allow a selection. If I instead disable popups via ExpB (as suggested in this post), it disables popups for both layers, which I don't want either.
Any ideas an suggestions welcome!
*I'm using ArcGIS Online