I was wondering how to change the default marker shape in a Leaflet map to circles
$.ajax("data/StatesPopulation.geojson", {
dataType: "json",
success: function(response){
L.geoJson(response, {
onEachFeature: onEachFeature
}).addTo(mymap);
}
});
Best Answer
Within the L.geoJson function you can call the
pointToLayer
function.To create circles you can do something like:
In this documentation you can see a more detailed example.