Intentalo así:
Código Javascript
:
Ver originalvar results = new L.LayerGroup().addTo(map);
searchControl.on("results", function (data) {
results.clearLayers();
for (var i = data.results.length - 1; i >= 0; i--) {
results.addLayer(L.marker(data.results[i].latlng));
coorx = data.results[i].latlng.lat;//Variable a llamar
coory = data.results[i].latlng.lng; //Variable a llamar
};
alert(coorx);//No funciona
});