aboutsummaryrefslogtreecommitdiffstats
path: root/app/geometry.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/geometry.js')
-rw-r--r--app/geometry.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/geometry.js b/app/geometry.js
index 9b89106..d0f5467 100644
--- a/app/geometry.js
+++ b/app/geometry.js
@@ -146,7 +146,10 @@ export class Geometry {
return Polygon.fromGeoJSON(geojson);
case "MultiLineString":
return MultiLineString.fromGeoJSON(geojson);
+ case "MultiPolygon":
+ return Polygon.fromGeoJSON(geojson);
default:
+ debugger;
throw new Error(`Invalid GeoJSON object: missing required 'type' property`);
}
}
@@ -1031,7 +1034,6 @@ export class Feature {
* @param {string|number} [id] - Feature ID
*/
constructor(geometry, properties = {}, id = "") {
- this.type = "Feature";
this.geometry = geometry;
this.properties = properties;
this.id = id;
@@ -1070,7 +1072,6 @@ export class Collection {
* @param {Feature[]} features - Feature array
*/
constructor(features = []) {
- this.type = "FeatureCollection";
this.features = features;
}