So, I’m trying to make a map using geoJSON. My layer has a lot of points, so I’m using circle markers for performance. I’m a bit unclear on how to chain the pointsToLayer method and an onEachFeature function.
Currently, my code looks like this:
L.geoJSON(features, {
pointToLayer: function(feature, latlng){
return L.circleMarker(latlng, circleMarkerOptions);
}}).addTo(mymap);
});
The current code works, but I haven’t had much luck with the syntax of attaching the popups to the individual features.