Select to view content in your preferred language

Problem with Swipe widget

1109
6
10-02-2023 06:10 AM
Labels (1)
ArekP
by
New Contributor II

Hello!

I noticed a problem with the swipe widget in my app.

I would like to compare several WMS layers added to the map with each other. All the layers in the map app are set as visible.

https://uneplive.maps.arcgis.com/apps/mapviewer/index.html?webmap=a5e54afc627546838c1bbf7fb2ee4c81

However, for some reason the widget doesn't work and only displays the layer that is at the top of the list. Although I have selected other layers available in the map app for comparison.

https://experience.arcgis.com/experience/de49b8b9ae904bdcad141f15457180e5/?draft=true

From what I understand, the leading layers section should activate the layers on the left, and the trailing layers section on the right.

For some reason it doesn't work for me. I would appreciate for any tips or hints.

Tags (1)
0 Kudos
6 Replies
JeffreyThompson2
MVP Regular Contributor

The order layers are listed affects the order they are drawn. Layers lower on the list are drawn first and can be covered up by layers later in the drawing order. 

The Swipe widget is working as intended. To see it in action, you will need to rearrange your drawing order or make the upper layer transparent.

GIS Developer
City of Arlington, Texas
0 Kudos
ArekP
by
New Contributor II

Thanks for your answer!
But is it definitely working as intended? I don't quite understand how this application and the 'Customize settings' panel options work. In the documentation it is described as:


Leading layers appear above or left of the slider, depending on the orientation you select for the widget. Trailing layers appear below or right of the slider.


Therefore, what I understood is that when the 'Swipe' widget is enabled, the selection of available layers in the 'Leading layers' and 'Trailing layers' will be enable/disable the selected map layers on the left or right side of the slider.

Otherwise why the multiple layer selection option in the 'Customize settings' panel ?

0 Kudos
JeffreyThompson2
MVP Regular Contributor

Layers listed in the swipe panel will be made visible/invisible based on the position of the swiper. Layers that are not listed in the swipe panel will not be affected.

Imagine making a map trying to convey the message that 'over the past ten years, as this group has moved into this area, this political party has become more popular'. In this map, I have a polygon layer of borders and a point layer of cities that I keep outside of the swipe as they are for reference and do not change in this timeframe. On the left side of the map, I represent the modern day with a polygon layer of demography information and another layer with voting information. And on the right side, I have another version of the same layers containing data from ten years ago. The net effect of this map is a set of information that stays the same and another that shows changes over time.

GIS Developer
City of Arlington, Texas
0 Kudos
CameronBlandy
Occasional Contributor

Did you ever get a proper explanation for this behavior?

I am experiencing the  same issue. I have a web map with a number of layers of Aerial Images that I would like to compare. I have added all layers to both the leading and trailing parts of the Swipe tool.

I would have thought  that the user should be able to choose one from each panel to do the comparison but toggling does nothing. It does not turnoff the layers not to be used in the swipe tool. There seems to be a disconnect between the swipe tool and the map.

0 Kudos
ArekP
by
New Contributor II

Yes, I did.
The behawior of the Swipe Widget is not intuitive.

The overriding option that directs the display of selected layers for comparison remains the layers window (Map Layers widget).
First, you must select in the layers window (Map Layers widget) the objects (layers) you want to have available for comparison. Only later should you select (deselect) layers with the Swipe widget.
The best practice is to add the swipe and map layers widgets to the map window and experiment.

GBacon
by
Occasional Contributor

Agreed. Not intuitive at all to set up, which also means it will be more difficult for end users. Our county's Historical Imagery Viewer will become less useful in my opinion. 

0 Kudos