From 5eba467a7eb84409aa43df83de78ecb843a79d7b Mon Sep 17 00:00:00 2001 From: Petri Hienonen Date: Sun, 9 Nov 2025 22:17:04 +0200 Subject: Update --- app/geometry.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/geometry.js') 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; } -- cgit v1.2.3-70-g09d2