-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Zoom to layer extent #22
Comments
I looked at https://github.com/proj4js/proj4js for more info on how to convert a layer extent from a different projection. The City of Madison, Wisconsin provides wkid 103412 as their projection. I don't see a way to implement this without finding a large set of defaults, a service to retrieve projection definitions, or allow user to write in the projection details |
You should be able to use a Geometry service to do the reprojection with only the input SpatialReference from the MapServer or FeatureServer layer, i.e. http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/project?inSR=4326&outSR=102100&geometries=%7B%22geometryType%22%3A%22esriGeometryPolygon%22%2C%22geometries%22%3A%5B%7B%22rings%22%3A%5B%5B%5B-117%2C34%5D%2C%5B-116%2C34%5D%2C%5B-117%2C33%5D%2C%5B-117%2C34%5D%5D%2C%5B%5B-115%2C44%5D%2C%5B-114%2C43%5D%2C%5B-115%2C43%5D%2C%5B-115%2C44%5D%5D%5D%7D%2C%7B%22rings%22%3A%5B%5B%5B32%2C17%5D%2C%5B31%2C17%5D%2C%5B30%2C17%5D%2C%5B30%2C16%5D%2C%5B32%2C17%5D%5D%5D%7D%5D%7D&transformation=&transformForward=false&f=html |
@mapmeld I think this should happen after the layer list is loaded (/0 to /x) and the user selects a layer, but before they see the list of attributes (which often obscures the entire map). In most cases, I believe that the map should zoom to that extent to start, unless the user is at a smaller current map extent (more zoomed in) than that extent would move them to. |
10.3+ and ArcGIS Online query operations support
as such, i think it'd be just fine to only offer a 'zoom to layer' feature for modern services. |
I do get the extent returned with the initial metadata, I just can't control what projection comes back. I am thinking that this feature is possible to add and then only keep enabled for services with a common spatial reference Something else to keep in mind: zoom to extent will be useful but unlikely to be perfect - a citywide service shouldn't be imported in one go like this, we expect people to zoom in. But it does help with initial setup / figuring out why things aren't working |
Another option would be to have some means of "minimizing" the attribute-picker page so that you can see the map behind it, right now once you add a service URL, you can no longer zoom to a different area to reduce the number of features in the current extent without closing the attribute display. |
When adding a layer, if the user is currently viewing an area outside the extent of the layer (rectangle A does not intersect rectangle B), the screen should pan to the area of data coverage and display the service extent as a rectangle on the map (kind of like how HOT handles this)
The text was updated successfully, but these errors were encountered: