Uncaught SyntaxError:missing)
var Attraction_sitesLayer= L.geoJson(Attraction_sites,{
onEachFeature: function(feature,featureLayer) { featureLayer.bindPopup(feature.properties.Tourist attraction Sites);
}
}).addTo(newMap);
答案 0 :(得分:-1)
在访问不是有效标识符的对象的属性时,您需要使用索引语法,即括号。
var Attraction_sitesLayer = L.geoJson(Attraction_sites, {
onEachFeature: function(feature, featureLayer) {
featureLayer.bindPopup(feature.properties["Tourist attraction Sites"]);
}
}).addTo(newMap);