-1

Uncaught SyntaxError: missing ) after argument list

 var Attraction_sitesLayer= L.geoJson(Attraction_sites,{    
onEachFeature: function(feature,featureLayer) {     featureLayer.bindPopup(feature.properties.Tourist attraction Sites);    
}
 }).addTo(newMap);
AKX
  • 152,115
  • 15
  • 115
  • 172
Jerry
  • 1
  • 1

1 Answers1

-1

You need to use the indexing syntax, i.e. brackets, when accessing an attribute of an object that is not a valid identifier.

var Attraction_sitesLayer = L.geoJson(Attraction_sites, {
  onEachFeature: function(feature, featureLayer) {
    featureLayer.bindPopup(feature.properties["Tourist attraction Sites"]);
  }
}).addTo(newMap);
AKX
  • 152,115
  • 15
  • 115
  • 172