Select to view content in your preferred language

How to create an app with a functional swipe widget?

476
4
02-12-2026 12:24 PM
TannerHarris
Emerging Contributor

I want to create a simple web app that uses a swipe widget to compare three separate aerial image layers (3 years of imagery at the same location, 2023, 2024, 2025). I want to be able to compare any one layer to any other layer:

2023->2024

2023->2025

2024->2025

Three possible comparisons need to be made. The only way I've found possible thus far is by using the swipe widget in ExB, but in order to pull off that third comparison, 2024->2025, the end user has to figure out a nasty configuration of options made available using the "Allow deactivating layers" options and the "Toggle layer visibility" option.

The "Allow deactivating layers" options cannot be used on its own, because the draw order of the layers in the connected web map will cause data at the bottom of the draw order to be covered, whether layers above are deactivated or not using the blue check boxes the option provides. This option simply does nothing when swiping between layers of the same web map, unless I am confused, which is always possible.

The "Toggle layer visibility option cannot be used on it's own because when 2024 is used both as a leading and trailing layer, toggling visibility as one type of layer (leading) also toggles the visibility for the other (trailing) as well.

TannerHarris_1-1770927720832.png

 

So the only solution I've found to compare 2024 to 2025 is to turn off visibility for 2023 in the leading layers dropdown, while deactivating 2024 but leaving it visible in the trailing layers dropdown. This simply is not a viable solution for end users that are completely unfamiliar with GIS. They will not figure out how to do it.

TannerHarris_0-1770927598555.png

If anyone has nay advice please reply!

0 Kudos
4 Replies
Katie_Clark
MVP Regular Contributor

Have you looked into the ArcGIS Instant App "Compare" layout? You can have three maps side-by-side, and choose to synchronize the maps so that panning one controls all maps, or leave them independent. 

Best,
Katie

If this post helped you, please consider giving a kudos and/or marking as the accepted solution. Thanks!
0 Kudos
TannerHarris
Emerging Contributor

I have not, but I really do like the simplicity of the swipe tool, and I think folks that are not familiar with mapping understand it intuitively. Do you know if what I'm trying to do is possible with the swipe widget in ExB?

0 Kudos
Katie_Clark
MVP Regular Contributor

Unfortunately, not that I know of outside of the cumbersome workflow you described. I found this post that describes a situation very similar to yours, but it doesn't look like they found an acceptable workaround either...

Best,
Katie

If this post helped you, please consider giving a kudos and/or marking as the accepted solution. Thanks!
0 Kudos
Katie_Clark
MVP Regular Contributor

@TannerHarris ACTUALLY.....maybe the Imagery Viewer instant app would work? I was reading documentation and it seemed at first it wouldn't work for multiple layers the way you wanted, but I just created a quick test app, using this public web map, and looks like it might work for what you need??

Katie_Clark_0-1770994878440.png

Katie_Clark_1-1770994976570.png

 

 

Best,
Katie

If this post helped you, please consider giving a kudos and/or marking as the accepted solution. Thanks!