fix geojson example #233

This commit is contained in:
Mourner 2011-08-10 15:30:29 +03:00
parent 6dd915a1e5
commit 3aa4302517

View File

@ -41,7 +41,7 @@
geojson.on('featureparse', function(e) {
// you can style features depending on their properties, etc.
var popupText = 'geometry type: ' + e.geometryType + '<br/>';
if (e.layer instanceof L.Path) {
if (e.layer.setStyle) {
e.layer.setStyle({color: e.properties.color});
popupText += 'color: ' + e.properties.color;
}