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() function not working with MapServer #822

Closed
Metalyph opened this issue Aug 4, 2016 · 3 comments
Closed

nearby() function not working with MapServer #822

Metalyph opened this issue Aug 4, 2016 · 3 comments

Comments

@Metalyph
Copy link

Metalyph commented Aug 4, 2016

  • Browser and version:
    Google Chrome, Version 52.0.2743.82 m (64-bit)
  • Version of Leaflet (L.version):
    1.0.0-rc.2
  • Version of esri Leaflet (L.esri.VERSION):
    2.0.1

I am attempting to query an ArcGIS MapServer using the nearby() function of leaflet-esri.

CodePen demonstrating the issue:
http://codepen.io/Metalyph/pen/pbxZja?editors=1111

The query works fine with a FeatureServer, however, using a MapServer the query yields no results. I have a rectangle set up on the MapServer to demonstrate that the map layer is query-able using other methods.

@jgravois
Copy link
Contributor

jgravois commented Aug 4, 2016

from the doc:

Only available for Feature Layers hosted on ArcGIS Online or ArcGIS Server 10.3.

in the documentation we also need to clarify that the method is only supported when the above is true _and_ when an individual service supportsQueryWithDistance

"advancedQueryCapabilities": {
  "supportsQueryWithDistance": true
}

your map service layer does not:
http://64.15.76.182/arcgis/rest/services/IRAP_Data/FDS_Mapping/MapServer/1?f=pjson

this one does:
http://sampleserver5.arcgisonline.com/arcgis/rest/services/Census/MapServer/3?f=pjson

@Metalyph
Copy link
Author

Metalyph commented Aug 4, 2016

So in theory, if we were to enable supportsQueryWithDistance on our MapServer, could we query it using nearby()? Or will it only ever work on FeatureServices?

Also, I apologize, I missed that bit in the documentation. At this point I realize that I'm just looking for general help with esri-leaflet, is there a better place to be posting this?

@jgravois
Copy link
Contributor

jgravois commented Aug 4, 2016

if we were to enable supportsQueryWithDistance on our MapServer, could we query it using nearby()?

yup.

from the REST doc:
http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Dynamic_Layer_Table/02r3000000q0000000/

supportsAdvancedQueries returns false in the following scenarios:

  • The layer / table resides in a workspace other than an enterprise database or File Geodatabase.
  • The layer / table is joined with another layer / table from a different workspace.

Also, I apologize, I missed that bit in the documentation.

you didn't miss anything. the information i outlined in my first reply isn't there (yet).

there's no harm in you logging issues for these questions. that being said, if you'd like to attract more eyes, we've listed a few additional options in the README as well.

https://github.com/esri/esri-leaflet#issues

i've created a ticket in esri-leaflet-doc as a reminder to provide additional clarification. let me know if you have any other questions.

@jgravois jgravois closed this as completed Aug 8, 2016
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