From e9c3322e16c16963e444ec0103047e2a2e46d6cb Mon Sep 17 00:00:00 2001 From: EpicKiwi Date: Tue, 9 Jun 2026 10:26:20 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Support=20des=20g=C3=A9om=C3=A9tries=20n?= =?UTF-8?q?ull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/places.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/places.js b/js/places.js index aebbb17..85c44f8 100644 --- a/js/places.js +++ b/js/places.js @@ -108,6 +108,11 @@ export class PlaceDatabase extends EventTarget { console.warn(`Warning: a feature with ID "${feature.id}" already exists in database`) } + if(!feature.geometry){ + console.warn(`Geometry ${feature.id} does not have a geometry, it will not be included`) + return + } + this.featuresById[feature.id] = feature let event = new Event("newfeature") @@ -244,9 +249,6 @@ export class MapFeature { asPoint(){ if(!this[POINT_FEATURE]){ - if(!this.geometry){ - debugger; - } if(this.geometry.type != "Point"){ let point_feature = turf.centerOfMass(this) point_feature.properties = this.properties