Hi all,
I'm having issues with zoom to feature code. I am using the code in the sample "Listed Related features" but doesn't seem to work and the confusing part is that there are no errors displaying.
mapView.setViewpointGeometryAndPadding(feature.geometry, 30);
Is this correct or does anyone know of another way I can zoom to feature while clicking on a feature on the map?
Thanks all
Solved! Go to Solution.
Hello @EricAtkinson1 ,
Could you possibly zip up a reproducible project?(preferably simplified to the the function in question MapView.setViewpointGeometryAndPadding and the minimum supporting code to reproduce the problem). Also could you possibly try the latest version of the SDK to see if this is still a problem at the current release? You can also utilize the sample data above that I used if providing your data is not an option.
Hey Jared,
I've been really trying to solve this myself but no deal. I have attached a zip file with my partial code (where i believe the issue is) in with your original code. All my other features are working including searching address and it zooms to that location. I have attached a screenshot of my app for understanding of what I am trying to achieve (zoom into in feature on selecting).
Everything else works just for some reason the zoom to feature.
Cheers,
Eric
I figured it out. Thanks for all your help 👍
mapView.setViewpointCenterAndScale(feature.geometry, 1000);