Skip to content
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

Support overriding "isModern" in featurelayer options #934

Closed
spoilsportmotors opened this issue Mar 8, 2017 · 2 comments
Closed

Support overriding "isModern" in featurelayer options #934

spoilsportmotors opened this issue Mar 8, 2017 · 2 comments

Comments

@spoilsportmotors
Copy link
Contributor

  • Version of Leaflet (L.version):
    1.0.3
  • Version of esri Leaflet (L.esri.VERSION):
    2.0.7

Steps to reproduce the error:

We're running ArcGIS Server 10.4.1, which supports geojson output. Usually it's fine, but we get errors back occasionally of the form:

{"error":{"code":400,"message":"Failed to execute query.","details":[]}}
Server error logs merely say: "General geodatabase error occured."

The queries look pretty innocuous (not noticably different than those which succeed):
https://our_dev_server_name.us/arcgis/rest/services/some_service/MapServer/5/query?returnGeometry=true&outSr=4326&outFields=*&inSr=4326&geometry=%7B%22xmin%22%3A-117.1966552734375%2C%22ymin%22%3A34.05550388259356%2C%22xmax%22%3A-117.19596862792969%2C%22ymax%22%3A34.05607276338367%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&geometryPrecision=6&f=geojson

If I test this query in my browser, I get the same error; changing 'f=geojson' to 'f=json' allows the query to succeed.

As a work-around we've disabled the check for "isModern", and all layers draw as expected.

I'd be happy to submit a PR to add "isModern" to the options, so we can it at layer creation time, at least until we hear from the server team about the source of our geojson woes.

  • Optional: I'm not using the CDN, I'm loading/bundling the library using webpack.
@jgravois
Copy link
Contributor

jgravois commented Mar 8, 2017

thanks for the report.

I'd be happy to submit a PR to add "isModern" to the options, so we can it at layer creation time, at least until we hear from the server team about the source of our geojson woes.

please do!

@spoilsportmotors
Copy link
Contributor Author

Can someone check if #935 is acceptable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants