Fixed geojson example error #304
This commit is contained in:
parent
c2e241e2bc
commit
0892da2aca
@ -40,10 +40,10 @@
|
||||
|
||||
geojson.on('featureparse', function(e) {
|
||||
// you can style features depending on their properties, etc.
|
||||
var popupText = 'geometry type: ' + e.geometryType + '<br/>';
|
||||
if (e.layer.setStyle) {
|
||||
var popupText = 'geometry type: ' + e.geometryType;
|
||||
if (e.layer.setStyle && e.properties && e.properties.color) {
|
||||
e.layer.setStyle({color: e.properties.color});
|
||||
popupText += 'color: ' + e.properties.color;
|
||||
popupText += '<br/>color: ' + e.properties.color;
|
||||
}
|
||||
e.layer.bindPopup(popupText);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user