URL Parameters - Query & Level

1099
2
07-20-2017 02:25 PM
BrianCollins
Occasional Contributor

Using URL parameters passed to a web application, does the "zoom to" operation in a query override or take precedence over the level request? Below is a generic example of passing both a query and a level request. The app initially loads and seems to zoom the the appropriate level, but then runs the query against the requested layer and zooms to the feature. 

https://my.url.com/apps/maps/?query=mypointlayer,myattribute='123abc'&level=12 

My issue is that when the map zooms to the point features on the query request, the users has too zoom back out 3 or 4 levels to get a sense of where they're at.

Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Brian,

   Yes the query is a deferred that will take precedence over the zoom level. The only way you can fix this is to modify the MapUrlParamsHandler.js file selectFeatures method. Where it does the map.setExtent

BrianCollins
Occasional Contributor

Thanks Robert...I'll change the query to hit Lat/Long rather than an attribute which seems to work fine and respect the zoom level request.

0 Kudos