GeoJSON GeometryCollection passes consisent params to pointToLayer

This commit is contained in:
Calvin Metcalf 2012-10-27 22:10:20 -04:00
parent 774fe5c594
commit 0529a92589

View File

@ -97,7 +97,11 @@ L.Util.extend(L.GeoJSON, {
case "GeometryCollection": case "GeometryCollection":
for (i = 0, len = geometry.geometries.length; i < len; i++) { for (i = 0, len = geometry.geometries.length; i < len; i++) {
layer = this.geometryToLayer(geometry.geometries[i], pointToLayer); layer = this.geometryToLayer({
"geometry": geometry.geometries[i],
"type": "Feature",
"properties": geojson.properties
}, pointToLayer);
layers.push(layer); layers.push(layer);
} }
return new L.FeatureGroup(layers); return new L.FeatureGroup(layers);