function cellPopup(feature, layer) {
// does this feature have a property named popupContent?
if (feature.properties && feature.properties.小区名称) {
layer.bindPopup(feature.properties.小区名称);
}
}
var badaccess= L.layerGroup([L.geoJSON(badaccessgeo, {
style: {
“color”: ‘red’,
“weight”: 1
},
onEachFeature: cellPopup
}).addTo(map)])