Leaflet tooltip - json object properties as labels

I think I got it following this example:

Here’s the code:

  let data_geojson_layer = L.geoJson(data_geojson, {
    onEachFeature: function(feature, layer){
        console.log(feature.properties);
        var content = "Project: " + feature.properties["Mining_Pro"]; 
        layer.bindPopup(content);
  }

I’ve also updated the notebook. If there’s a better way of doing this, please let me know!

1 Like