I am trying to display a popup from the attribute value of a geojson layer by calling the geojson file. However, the popup displayed on the edges of the boundaries of the polygons features only.
Here is the code:
var region = L.geoJson(region_data, {
style: {
fillColor: 'none',
weight: 2,
opacity: 1,
color: 'black'
},
onEachFeature: function (feature, layer) {
if (feature.properties && feature.properties.name) {
layer.bindPopup(feature.properties.name);
}
}
})