Convert ESRI Leaflet featureCollection to JSON

المشرف العام

Administrator
طاقم الإدارة
I've followed the Esri Leaflet sample code found here:

http://esri.github.io/esri-leaflet/api-reference/tasks/query.html

//Querying features near a latlngvar latlng = L.latLng(45.51, -122.70);var query = L.esri.Tasks.query({ url:'http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/stops/FeatureServer/0'});query.nearby(latlng, 500);query.run(function(error, featureCollection, response){console.log('Found ' + featureCollection.features.length + ' features');});So now that I have the features any Idea of how to export them out as JSON or GeoJSON? I need them as input for another app. So far the only thing I found you could do is count them..

Any clues or samples would help, I thinking it an obvious answer hiding in front of me but I don't see it.. Thanks.. Bill



أكثر...
 
أعلى