-
Notifications
You must be signed in to change notification settings - Fork 799
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
Query bounds Mapserver #879
Comments
Hi @mepdr Why would you run a query You can see that that returns a legitimate result Does that help? |
@rowanwins |
Hi @mepdr From what I can see from your description I would say this is expected behaviour, how could you have a valid latLngBounds if you aren't returning any features? If it we're me I'd probably be doing something like
It might help to see a jsfiddle |
Unfortunately the issue is exactly that |
Esri has a stack of sample servers which are good for this sort of thing eg |
Live example here: http://jsbin.com/tatadejiya/1/edit?html,console,output |
http://jsbin.com/jevonemuju/1/edit?html,console,output I've adjusted your snippet and move the setWhere() to before the query method and it now works |
@rowanwins |
ah I'm finally with you sorry @mepdr So it looks like we just need to add an extra check here to make sure that response.extent is actually checked a bit more thoroughly |
@mepdr what behavior would you prefer to see?
the codebase is open source and @rowanwins has pinpointed the correct location to pin a fix, so it doesn't need to be me doing the patching. |
IMHO the behavior should be the same there is for a featureServer service. |
makes sense to me. turns out this isn't a {"extent":null} {"extent":{"xmin":"NaN","ymin":"NaN","xmax":"NaN","ymax":"NaN"}} i've proposed a patch in #885 and asked our devs to consider making sure the ArcGIS Server response matches the hosted feature service response in the future. thanks for the report. |
Nice work @jgravois finding that difference between the AGO and the ArcGIS Server responses, nice little quirk that had the potential to cause a few headaches! |
going forward we will pass both the |
Quering a Mapserver layer service for bounds like:
I got
The server response is:
{"extent":{"xmin":"NaN","ymin":"NaN","xmax":"NaN","ymax":"NaN"}}
The same against a featureServer, (i,e, https://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/stops/FeatureServer/0/query?returnGeometry=true&where=1=2&outSr=4326&outFields=*&returnExtentOnly=true&f=json) returns
{"extent":null}
Running arcgis 10.4
Live example http://jsbin.com/tatadejiya/1/edit?html,console,output
The text was updated successfully, but these errors were encountered: