Select to view content in your preferred language

Web AppBuilder configure maximum extent

2209
4
Jump to solution
09-05-2019 11:51 AM
LynnGaines
Occasional Contributor

Is there a way to set/configure the maximum extent for a base map?  Currently, the extent zooms out to display points in two very different cities. (It was created this way.)  However I would like the extent to only show points in one city, but continue to show attribute results for all locations. 

The first attachment shows the points at two locations (PA_FL.png).  The second attachment displays the extent that I would prefer (Philly.png)

Thank you for your help.

Lynn

0 Kudos
1 Solution

Accepted Solutions
LynnGaines
Occasional Contributor

After looking at the map service and web app to no avail, I decided to work with my data.  There is a field that identifies whether the location geocoded (Philadelphia) or not at all (Orlando).  I included a CASE statement in my query that when the field is 1 shape is null.  This change keeps all records and only shows Philadelphia in Web AppBuilder.

Chelsea, thank you for your help with this.

View solution in original post

0 Kudos
4 Replies
ChelseaRozek
MVP Regular Contributor

On the Map tab in WAB, go down to the button in the middle of the panel that says Customize... for the Customize Visible Scales menu. In the popup, you can delete which scales you don't want shown in your WAB app. I usually delete the 6 or so top ones so users can't zoom out to the whole US or world since everything I do is only on the county level. Above that button (on the Map tab), you can set the default extent to make sure they start on the correct view you want. They could technically still pan over to Florida, though that's unlikely since it would take forever since they won't be able to zoom out all the way.

LynnGaines
Occasional Contributor

Thank you for replying Chelsea.

I tried your suggestions and the display now zooms to the FL location only.  So, maybe 'Customize' allows for scale control, but not for maximum extent boundary control?  

0 Kudos
ChelseaRozek
MVP Regular Contributor

Oh, I'm sorry, I thought that's what you were looking for. That's right, it only sets the maximum/minimum scale levels.  Setting the default view to Philly (in WAB if you aren't allowed to change the webmap) and constraining the zoom levels would make it very difficult for users to see Florida as they would have to manually pan down the eastern seaboard at the city level, and Florida would still be available in the attribute table. I'm not sure how to prevent users from panning in WAB. I haven't seen anything built in, so I imagine it would have to be custom. I have seen it built into the Minimalist template as "Disable all map navigation", though then you're missing all the widgets of WAB of course.

0 Kudos
LynnGaines
Occasional Contributor

After looking at the map service and web app to no avail, I decided to work with my data.  There is a field that identifies whether the location geocoded (Philadelphia) or not at all (Orlando).  I included a CASE statement in my query that when the field is 1 shape is null.  This change keeps all records and only shows Philadelphia in Web AppBuilder.

Chelsea, thank you for your help with this.

0 Kudos