I am trying to create a white mask in the foreground to hide the features beyond my county boundary. I created a feature layer and put it on top of the other layers, but it is loaded at the end, meaning that the user can still see the features beyond the boundary when the map is loading. Another problem is that popups of features behind the mask cannot be disabled. Is there a better way to do this?
Some of my concerns:
1. I cannot use definition query because many feature layers do not have county field.
2. I cannot use mask as image or tile layer as they cannot be put on top of feature layers.
3. I cannot publish the feature layers as my own image layers as I do not own the feature layers.
Thanks!
To get around the popups, I would try to apply attribute-based filters to your layers if possible. I see you do have some on already, but more of the layers include a county attribute:
Once that's applied to all possible layers (most importantly the Open Space areas), the map is already starting to look more spatially focused, even without the Foreground layer.
The big issue now are the transportation lines. But are popups strictly necessary for those? The way they're currently configured doesn't seem to serve much purpose.
If you simply disable popups on the features that can't be filtered, you'll have a solid, location-specific map, and clicking outside the county boundaries won't show anything.
Final note: you might consider publishing that foreground layer as a vector tile, as that will scale nicely, and won't have to re-load as you pan around the map, resulting in layers "peeking" through the foreground as you pan.
Thank you for the ideas. This map is just a working example, while my question is in general, for other feature layers that I will deal with in the future. Many of the popups are not necessary (and not configured at all), and I did not apply county attribute filter on all possible layers. I will look into them.
I used blend modes, popped some of the layers in the basemap category and set a filter on the data that can be filtered by county. Without having that full data with county classified I think this would be the best you could do.
https://jsapi.maps.arcgis.com/apps/mapviewer/index.html?webmap=36dee04e99f84e599234d2e12c26259d
Your modifications to my map looks great! Is blend mode only in new Map Viewer? Looks like it's taking online map making to a new level.
Yup blend modes are available in the New Map Viewer and supported in other 4.x web apps.