question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Query bounds Mapserver

See original GitHub issue

Quering 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:closed
  • Created 7 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
rowanwinscommented, Nov 11, 2016

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!

0reactions
jgravoiscommented, Nov 15, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found