Map Viewer doesn't respect filters applied to layers in webmap

07-22-2022 11:30 AM
Occasional Contributor

There is what appears to be a bug in Map Viewer 5.4, where filters applied to the webmap in the Portal/Online where the webmap is used, are not respected within the map in Map Viewer.

We have some applications that use Map Viewer as a base, and this has been identified as a mostly consistent, replicable problem. To replicate, see following steps: 

1. In Portal, create a webmap and add a feature layer. In Table of Contents, apply a filter to this layer. Ideally, this is a layer that you can easily check visually to determine whether the filter has been applied to later. Save webmap and use item ID in your Map Viewer sample within settings. 

2. Open up Map Viewer and visit the map page to see the webmap. The filter will likely be applied correctly in this view. 

3. Tap the "i" button on the top navbar and then the "Layers" tab to see the list of layers. 

4. With the list of layers open on the screen, tap a feature on the map for the layer that you applied the filter to earlier.

The layer on the map removes the filter at once and we're possibly looking at a map that is very different from the webmap it's supposed to emulate. 

If you still can't replicate the bug, then turn the layer off/on in the list and click on the feature again. Playing with the map like this consistently produces the bug. 

In MapViewer 5.3, the issue took less steps to replicate, as you could see the filter was not applied at all when the map page loads. 

Has anyone else ran into this issue? How did you solve it? I'm digging through the MapPage code here, trying to see where the filters are getting reset or where they should be applied. 

I'm also trying to create a standalone application with a Map Viewer and Map component that references a webmap, to see if this is a general problem with the Map Component or just a Map Viewer issue.

For a visual representation of this, see below.

A screenshot of my webmap in ArcGIS Online that shows the filter correctly applied:


A video of what Map Viewer looks like with the issue present:

Thank you!

Application Developer, GeoMarvel
0 Kudos
1 Reply
Esri Contributor

Hi @KevinCheriyan,

Thank you for reporting this. We will take a look into this.



0 Kudos