Select to view content in your preferred language

Map zoom, swipe widget

310
7
Jump to solution
3 weeks ago
JayHodny
Regular Contributor

Good afternoon, I have created an experience using the swipe widget.  I have two pages, each page's web map has multiple layers of aerial imagery over time (one map) and landuse/land cover data over time (the other map).  I added the swipe widget to each, advanced option, so I can select two layers to compare from the many layers.  I have this working for the most part.  What I cannot figure out is how to pan and zoom the map into an area of interest.  My experience with ExB is minimal but growing.  Thanks in advance for any help. Regards, Jay

0 Kudos
2 Solutions

Accepted Solutions
RhettZufelt
MVP Notable Contributor

Yes, I have 8 different years of overhead imagery in one web map (and some landbase layers).

I create an Image Viewer instant app and select the multi imagery web map as the input.

Then, in the config, I turn on the swipe tool, select which imagery I want on each side (I chose horizontal layout) of the slider:

RhettZufelt_0-1719416140664.png

Then open the Instant App.  Can toggle layers on/off, pan/zoom, etc. just like any other webmap, but, open the swipe tool, choose which layer you want on the right vs left, and you will see it update as you move the slider.

RhettZufelt_1-1719416373614.png

R_

View solution in original post

0 Kudos
RhettZufelt
MVP Notable Contributor

It appears as if you can configure the swipe tool to utilize one layer out of the grouped layers, but you need to set that in the configuration itself.

This app is great for comparing imagery, but not really intended as a general swipe app.  

If you want more flexibility, may need to create an Experience Builder app with swipe options.  Though a quick test I didn't get it to behave as expected and is less intuitive for the user than the old swipe tool.

However, though it doesn't support group layers (not really needed as normally create a web map just for feeding into the App), and is going away soon, using the swipe widget in the Web App Builder and Map Viewer Classic will allow you to select any/all layers that are visible in the map.

(If you want group layers in the Classic Viewer, you will need to group them before publishing the MapService.)

R_

View solution in original post

0 Kudos
7 Replies
MohammedHilal_K
New Contributor III

Hi,

Get the extent of ur AOI, set that into the view. It may be something like below code.

JimuMapView.view.extent=extent 

 

JayHodny
Regular Contributor

If the swipe tool is switched off, then the zoom/pan controls become visible, as does the mouse functions for panning and zooming.  Works, but one has to remember to do this.

0 Kudos
RhettZufelt
MVP Notable Contributor

If all you are using it for is comparing imagery, the Imagery Viewer instant app works great for this.  Just have to enable the swipe toggle in the setup.

R_

JayHodny
Regular Contributor

Thank you, I will investigate the Imagery Viewer instant app.  Off hand, can I select between multiple layers saved in a single web map?  Thank you again.

0 Kudos
RhettZufelt
MVP Notable Contributor

Yes, I have 8 different years of overhead imagery in one web map (and some landbase layers).

I create an Image Viewer instant app and select the multi imagery web map as the input.

Then, in the config, I turn on the swipe tool, select which imagery I want on each side (I chose horizontal layout) of the slider:

RhettZufelt_0-1719416140664.png

Then open the Instant App.  Can toggle layers on/off, pan/zoom, etc. just like any other webmap, but, open the swipe tool, choose which layer you want on the right vs left, and you will see it update as you move the slider.

RhettZufelt_1-1719416373614.png

R_

0 Kudos
JayHodny
Regular Contributor

Good evening,

I am fiddling around with the Image View instant application.  I have two groups of layers in my web map, one group is aerial photography, and the other is landuse land cover data.  All are consumed in the web map as services from an outside source (Delaware's FirstMap).  I can see the two groups in the instant application image viewer tool, but when I click the drop-down arrows to select the leading and trailing images, nothing shows.  I moved two layers outside of the group, and still nothing shows in the selector. 

Do you know if the application honors groups in web maps?  Is there any good help material online for configuring this application?

Thanks, Jay

0 Kudos
RhettZufelt
MVP Notable Contributor

It appears as if you can configure the swipe tool to utilize one layer out of the grouped layers, but you need to set that in the configuration itself.

This app is great for comparing imagery, but not really intended as a general swipe app.  

If you want more flexibility, may need to create an Experience Builder app with swipe options.  Though a quick test I didn't get it to behave as expected and is less intuitive for the user than the old swipe tool.

However, though it doesn't support group layers (not really needed as normally create a web map just for feeding into the App), and is going away soon, using the swipe widget in the Web App Builder and Map Viewer Classic will allow you to select any/all layers that are visible in the map.

(If you want group layers in the Classic Viewer, you will need to group them before publishing the MapService.)

R_

0 Kudos