AnsweredAssumed Answered

pulling data out of map click .run

Question asked by tim_in_hayward on Feb 26, 2015
Latest reply on Feb 27, 2015 by tim_in_hayward

Hi all,


Just playing around with esri-leaflet to see if I can get everything done easier.


I a bit of a novice, but was able to quickly access my data attributes on map click with Tasks.identifyFeatures.

However I don't know how to get that data out of that task and into a variable so I can process the selection elsewhere.


In the console.log in run, I can get all the info I want. How do I pass it back to the parcels variable in map.on and then get access to the data?


map.on('click', function (e) {

  parcels = queryOnMapClick(e);



function queryOnMapClick(clicked) {

        var clickedParcels = L.esri.Tasks.identifyFeatures(pathtoservice)




            .run(function (error, featureCollection, response) {

                 console.log("UTC Offset: " + featureCollection.features[0].properties.APN_PQ);




Thanks for any tips.