Query bounds Mapserver
See original GitHub issueQuering a Mapserver layer service for bounds like:
query.where("1=2").bounds(function(error, latLngBounds, response){
map.fitBounds(latLngBounds);
});
I got
Uncaught Error: Invalid LatLng object: (NaN, NaN)(…)L.LatLng
@ LatLng.js:24L.latLng
@ LatLng.js:128T
@ Util.js:32(anonymous function)
@ Query.js:139(anonymous function)
@ Service.js:96s.onreadystatechange
@ Request.js:75
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
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (9 by maintainers)
Top Results From Across the Web
LAYER — MapServer 8.0.0 documentation
The item that contains the location of the tiled data is given using the TILEITEM parameter. When a file is used as the...
Read more >Query: City Boundaries (ID: 8)
Query : City Boundaries (ID: 8). Where: Text: Object IDs: Time: Input Geometry: Geometry Type: Envelope, Point, Polyline, Polygon, Multipoint.
Read more >Query: Boundaries (ID: 0)
Query : Boundaries (ID: 0) ; Return True Curves: True False ; Max Allowable Offset: ; Geometry Precision: ; Output Spatial Reference: ;...
Read more >Query: Boundaries (ID: 21)
Query : Boundaries (ID: 21) ; Return True Curves: True False ; Max Allowable Offset: ; Geometry Precision: ; Output Spatial Reference: ;...
Read more >Query: Metes and Bounds (ID: 10)
Home > services > Layers > Legal_Base (MapServer) > Metes and Bounds > query · Help | API Reference. Query: Metes and Bounds...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
null
LatLngBounds and an error indicating that the geometry is invalid, no matter which form of the geometry we encounter in the service itself.