Select to view content in your preferred language

Popup with actions - zoom in to selected feature of a map image layer

1109
1
Jump to solution
10-11-2022 03:10 AM
nadja
by
Frequent Contributor

Hi everyone

We have several layers with popups in our final webmap. Most of the layers require popup without "zoom-in" functionality, which is why we disable the default actions. However, we would like to add a zoom-in and zoom-out functionality to one specific layer. the zoom-out works fine and zooms to the entire extent (plus buffer) so that the geometries don't stick to the frame. the zoom-in functionallity is not yet working. I tried several approaches. It seems like I just need to access the properties/attributes of the selected/clicked feature to recreate the zoom-out function (the default zoom-in would be an option, but I would rather use a function where I can add a buffer around the feature). Can anyone point out how I access the properties of the feature corresponding to the popup with an map image layer? thanks!

I created a pen - lines 140++: https://codepen.io/nwp_nadja_bernhard/pen/YzLRoNv

0 Kudos
1 Solution

Accepted Solutions
nadja
by
Frequent Contributor

classic - as soon as you ask something you find a solution. it's not nice, but it worked. I added it to the codepen, in case someone else is having the same question...

View solution in original post

0 Kudos
1 Reply
nadja
by
Frequent Contributor

classic - as soon as you ask something you find a solution. it's not nice, but it worked. I added it to the codepen, in case someone else is having the same question...

0 Kudos