Merge pull request #1240 from brianherbert/allow-null-geojson

Allow null GeoJSON geometries.
This commit is contained in:
Vladimir Agafonkin 2012-12-28 04:49:31 -08:00
commit 733666bcab

View File

@ -20,8 +20,11 @@ L.GeoJSON = L.FeatureGroup.extend({
if (features) {
for (i = 0, len = features.length; i < len; i++) {
// Only add this if geometry or geometries are set and not null
if (features[i].geometries || features[i].geometry) {
this.addData(features[i]);
}
}
return this;
}