Is it possible to set the map to zoom to a particular level when clicking on an item in a list?
For polylines and polygons, the app zooms to the extent of the feature.
For points, there is a "pointZoomScale" property that can be added/modified in the dashboard json (via AGO Assistant or other) to set a specific zoom scale. This property is not exposed to the dashboard creator at this time and must be manually changed in the json.
The app currently defaults to 10,000. So setting this property to a value like 1,000 will allow the map to zoom in more. The setting is per-webmap.
There is a workaround, no solution though. The workaround is to add a point layer (can use Feature to Point tool) and use this as your list in the dashboard. Then the point zoom will work and you can configure it so it looks like it's zooming in on your polygons.
... also looking for a solution to the polygon zoom to extent issue mentioned.
Not to my knowledge no. Are you aware of a solution?
Hello, did anyone provide a solution for a polygon zoom to extent within the List widget?
Good point. The updates will require an extra few steps. I will advocate for this addition to the category selector where I can. Thanks for commiserating.
Definitely a creative workaround! I unfortunately can't use this method as this data is overwritten fairly often by a select group of editors (the View is what's in the dashboard), and this would add another step to every overwrite that could leave a lot of opportunity for errors and widget breakages. I tried the same zoom scale I had modified in a List widget, and that one zooms exactly how I want it. So I think you're right that it is a limitation or a bug with the Category Selector "zoom to's".
Yep. Exactly same issue. I did find a workaround that is pesky but effective. I created a buffer layer for each point (my points are scattered throughout Maryland and I set the buffer for 1 mile - not dissolved). The buffer layer has the attributes as the point. I then input those into the webmap and Dashboard and turned off their visibility, but enabled the zoom in the widget to go to the buffer and not the point. This actually worked, but is rather inefficient. Surely there must be a better way..?!
Same here, I've changed the pointZoomScale in both the JSON and also in the map zoom scale in Settings. There is no change. My problem is that when the map zooms to a point, it gets in so close I have no reference for where I am on the map, so have to manually zoom out. This is not going to be intuitive for the end user. I am also using Category Selectors for the zoom to map actions.
Using only points, I am not seeing any change with the zoom after adjusting it in JSON (photo below - line 111). I have tried different numbers, but no change (and valid JSON). Does this really work in a Dashboard with an Action of "zoom" from a Category Selector? If so - what am I doing run. If not - is there a way to do this? Thanks
This is a great solution....why is it that when we are trying to do JSON code changes people always post screenshots of the code? WHY??? Just paste the text in here with formatting. Having to type out these long strings of code just leaves more room for error.
I'm working on a dashboard with different project areas that could end up having very different sizes and shapes. The polygon zoom doesn't zoom in close enough to see the details of the project, and the point zoom is not going to work for all the project areas since they're all different sizes.
It would be nice if when you set a zoom action in a dashboard there were zoom extent settings similar to those for Data Driven Pages/Map Series in ArcMap/Pro.
Did anyone ever provide a solution to change the zoom to extent for polygons?
Thank you for your quick response. I'll try doing the same. I was also thinking of creating a negative buffer that falls within the polygon feature and use that as my feature to zoom to. I'll see which one works best. Thank you again!
Liz
Elizabeth Ayarbe, I was never able to get polygons to work. I made invisible points inside each polygon, then I used one point zoom level that was the best fit for viewing the polygons. It is a work around, but it gets the job done and it looks like it is zooming in on the polygons.
I am trying to troubleshoot this question as well but with polygons. The answer states that the map should zoom into a polygon and that is not true. How do we change this for polygons? Thank you in advance!
What version of Portal are you all using? I am using 10.7 right now, and over-writing the json for the pointZoomScale from 10,000 to 1,500 has no affect on my dashboard. I am using a list widget for a point layer with the Zoom set up.
I have the same issue as well. The zoom to polygons is not very good. Is there a setting that can be changed for polygons? Aaron Pulver
Hello Matt,
You can use ArcGIS Online Assistant to get the Dashboard's JSON. However, please be careful when editing the JSON configurations as it could cause errors with the Dashboard. It is recommended to save a copy of the Dashboard, rather than editing the actual Dashboard.
Best,
Kanin
How do you get to the dashboard json in order to modify this parameter?
I want to zoom to a polygon (buildings) and show some of the surrounding area for context. Is there a polygonZoomScale property too? I tried it but nothing happened.
Paul
Correct, this is a parameter that we had to add to this JSON, it was not already there.
thanks this worked, however my JSON did not have this parameter to begin with, I had to add it.
Make sure to have the correct capitalization or it will not respect the parameter:
"pointZoomScale"
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.