I am trying to build a map app that use address name in data base and display marker in leaflet map. I had come across leaflet esri plugin but not sure how to use the code. Could anyone please teach me how to extract result(longitude and latitude) from the geocoding function and draw a marker? Thanks!
Geocode function:
L.esri.Geocoding.geocode(<Object> options)
Results:
{results: [
{
latlng: L.LatLng,
text: 'Formatted Address',
score: 100, // certainty ranking of the match
properties: {
// additional info like specific address components (Country Code etc.)
}
}
]
}
http://esri.github.io/esri-leaflet/api-reference/tasks/geocode.html