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

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