You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After adding a L.esri.FeatureLayer, Leaflet fails to draw the layer. After inspecting the network tab in developer tools, I noticed that the geometry is way off. After a bit of debugging, I realized that the request being sent to the service includes "outSr=4326". Changing it to "outSR=4326" corrects the issue.
Browser and version:
Chrome 76
Version of Leaflet (
L.version
):Leaflet 1.5.1
Version of esri Leaflet (
L.esri.VERSION
):esri Leaflet 2.3.0
Steps to reproduce the error:
Specific to private ArcGIS server
What happens is [X].
After adding a L.esri.FeatureLayer, Leaflet fails to draw the layer. After inspecting the network tab in developer tools, I noticed that the geometry is way off. After a bit of debugging, I realized that the request being sent to the service includes "outSr=4326". Changing it to "outSR=4326" corrects the issue.
According to the ArcGIS REST API documentation for Query (Feature Service/Layer) (https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm), the parameter should be "OutSR".
I was expecting [Y].
I would expect esri Leaflet to request the feature layer using the "OutSR" parameter instead of "OutSr".
I noticed that in esri Leaflet's Query.js task, (https://github.com/Esri/esri-leaflet/blob/1ec2167ed7ea13d67a8536bb62c49a04930a470e/src/Tasks/Query.js), the params object has "OutSr: 4326" hard-coded. Temporarily changing this to "OutSR" corrected the issue I was experiencing.
What surprised me is that it seems most other ArcGIS servers accept "OutSr" or "OutSR". In my case, the server only accepts "OutSR".
The text was updated successfully, but these errors were encountered: