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

Nearby queries incorrectly sending param "inSr" instead of "inSR" #1250

Closed
Voileexperiments opened this issue Dec 31, 2020 · 4 comments
Closed
Assignees
Labels

Comments

@Voileexperiments
Copy link

Voileexperiments commented Dec 31, 2020

I'm debugging a issue where a nearby query on a ArcGIS Enterprise feature layer does not work at all if it's initiated from leaflet (it either returns full result or empty), but works completely fine when testing on REST API page. After some squinting I discovered the only difference between two requests is that ArcGIS REST API page send inSR=4326 while Leaflet sends inSr=4326, which caused the nearby query to fail.

The correct param is inSR. Using inSr works for ArcGIS Online (https://esri.github.io/esri-leaflet/examples/querying-feature-layers-2.html) because presumably it's more lax with request params case-sensitivity.

I think there are a total of two places that needs to be changed, and the fix should be easy(?):

https://github.com/Esri/esri-leaflet/blob/master/src/Tasks/Query.js#L97
https://github.com/Esri/esri-leaflet/blob/master/src/Tasks/Query.js#L213

@jwasilgeo
Copy link
Contributor

jwasilgeo commented Dec 31, 2020

@Voileexperiments thank you for the clear description and doing some research on what's going on. We'll take a look.

Indeed this documentation only uses the case inSR: https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm

@jwasilgeo jwasilgeo self-assigned this Dec 31, 2020
@jwasilgeo jwasilgeo added the Bug label Dec 31, 2020
@jwasilgeo
Copy link
Contributor

@Voileexperiments can you also tell us what version of ArcGIS Enterprise you are seeing this issue with?

@jwasilgeo
Copy link
Contributor

Related to PR #1168 and its issue #1167 which focused on the outSR param.

@jwasilgeo
Copy link
Contributor

This will be available the next time we publish a new release.

jgravois pushed a commit to jgravois/esri-leaflet that referenced this issue Apr 23, 2022
jgravois pushed a commit to jgravois/esri-leaflet that referenced this issue Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants