Select to view content in your preferred language

Map zoom, swipe widget

121
5
Jump to solution
Tuesday
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
1 Solution

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
5 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