If I have a object containing lats and longs how can i plot them in Leaflet using the marker constructor I tried looping through them
for(key in obj){
var val = obj[key];
var markers = new L.Marker([val.lat, val.long]);
map.addLayer(markers);
}
but its not showing up in the map
var obj ={
0 : {
lat: 15.606562000000000
long: 32.513681000000000
},
1 : {
lat: -12.09137
long: 34.7182
}
}