Zoom to option from a popup doesn't zoom to polygon extent

959
7
04-28-2022 01:14 AM
Labels (1)
BlairPellegrino
New Contributor III

I've added a map into an Experience Builder (ArcGIS Online) with a single layer showing regional boundaries.  When I click on a region, the popup appears but when I click 'zoom to' it doesn't zoom to the whole region as expected.  Rather, it pans to where I have clicked and zooms in slightly.  If I click on 'zoom to' again, it continues to zoom in.  Is anyone else having this same issue?  Is it a bug or have I not configured something correctly?

Screen shots as examples:

1) Select region

BlairPellegrino_0-1651133442123.png

 2) Click zoom to

BlairPellegrino_1-1651133469840.png

3) Click zoom to again

BlairPellegrino_2-1651133503094.png

7 Replies
TonghuiMing
Esri Regular Contributor

@BlairPellegrino The popup behavior follows that of Map Viewer:

TonghuiMing_0-1651144785875.png

I believe this is the design and the zooming is executed gradually by levels, also representing the Zoom in/out behavior in the Map tools. See official document for Map Viewer - https://doc.arcgis.com/en/arcgis-online/get-started/get-started-with-mv.htm

TonghuiMing_1-1651145176262.png

 

0 Kudos
BlairPellegrino
New Contributor III

Hi @TonghuiMing - thanks for the response

My expectation was that the zoom to option would zoom to the full extent of the selected polygon, and wouldn't keep zooming if you pressed zoom to again.  Chatting to some others in the office, this was also their expectation based on past experience.

I have gone back and looked in some other apps to compare the behaviour and am getting mixed results.

I have two layers in another app (an AGOL dashboard with a map widget) - using the popup zoom to option on one layer zooms to full extent of the selected feature (as expected), but the other layer has the same behaviour as my original post.

In another app (a Portal WAB), I'm also getting different behaviour on different layers.  This app has the attribute table activated, and interestingly, on the layers that have the same behaviour as my original post, the zoom to option in the attribute table doesn't work.  I.e. I select a feature in the attribute table, press zoom to and the map extent doesn't change at all.  Seems like it might be related?

0 Kudos
GregG1
by
New Contributor

Yes, I'm experiencing the same issue as Blair, but in the ArcGIS Javascript API. About half of my layers zoom to the extent of the polygon properly and don't allow you to zoom beyond that. When you click on some polygons, though, the zoom button seems to almost create a fake point feature and then only zoom to that instead of the full extent of polygon. You can basically zoom forever, much like a point feature. Depending on where you click on the polygon, the zoom function seems to stick to that location.

I haven't figured out why certain layers act like this and others don't - they aren't configured any differently in ArcGIS Online storage as FeatureLayers.

BlairPellegrino
New Contributor III

Thanks Greg.  Unfortunately I never got to the bottom of it, and couldn't find a pattern as to why some layers functioned differently to others.  I just had to continue with the mixed behaviour.

0 Kudos
LaraFondow
New Contributor

I am just now discovering this post because I've recently made the switch from Map to Pro. I used the "zoom to" functionality in the identify tool quite frequently in ArcMap, as it was useful for things like identifying which watershed or section I was in and then zooming out to the full extent of that feature using the "zoom to" option in pop-up. The flash tool would also flash the whole polygon in Map, which also does not happen in Pro. I'm not even sure what the point of the "zoom-to" option is in Pro since it really doesn't do anything more useful than the flash tool. I have never had "zoom-to" behave the way that I expected it to within the pop-up menu in Pro. 

0 Kudos
LaraFondow
New Contributor

I have a caveat/correction to my previous message here, which I would just delete if I could now that I've learned more. The pop-up zoom-to functionality does seem to work the way I would expect for shapefiles that I have created and for dynamic feature service layers but not for cached map service layers that are just projecting an image of a feature layer. It did work for those layers in ArcMap, however, and these are the layers I have been using to gather background information about my project areas. At least now that I've kind of figured out what works and what doesn't, I can try to find layers that will behave the way I want them to. 

0 Kudos
Asrujit_SenGupta
MVP Regular Contributor

@BlairPellegrino 

Was facing the same issue. In our case, we had turned off visibility of the SHAPE field in Field Design (ArcGIS Pro) before publishing.

Once the service was republished with the SHAPE field, the Select and 'Zoom To' works as expected.

 

0 Kudos