diff --git a/Logic/FeatureSource/Sources/RenderingMultiPlexerFeatureSource.ts b/Logic/FeatureSource/Sources/RenderingMultiPlexerFeatureSource.ts index d2a96e86e..8c5cb5c2f 100644 --- a/Logic/FeatureSource/Sources/RenderingMultiPlexerFeatureSource.ts +++ b/Logic/FeatureSource/Sources/RenderingMultiPlexerFeatureSource.ts @@ -59,7 +59,7 @@ export default class RenderingMultiPlexerFeatureSource { addAsPoint(feat, rendering, GeoOperations.centerpointCoordinates(feat)) } - if (feat.geometry.type === "LineString") { + if (feat.geometry.type === "LineString" || feat.geometry.type==="Polygon" || feat.geometry.type === "MultiPolygon") { const coordinates = feat.geometry.coordinates for (const rendering of startRenderings) { addAsPoint(feat, rendering, coordinates[0]) diff --git a/Models/ThemeConfig/LayerConfig.ts b/Models/ThemeConfig/LayerConfig.ts index d42bd36ab..65a556665 100644 --- a/Models/ThemeConfig/LayerConfig.ts +++ b/Models/ThemeConfig/LayerConfig.ts @@ -200,12 +200,11 @@ export default class LayerConfig extends WithContextLoader { this.mapRendering = [] this.lineRendering = [] } else { - - this.mapRendering = json.mapRendering + this.mapRendering = Utils.NoNull(json.mapRendering) .filter(r => r["location"] !== undefined) .map((r, i) => new PointRenderingConfig(r, context + ".mapRendering[" + i + "]")) - this.lineRendering = json.mapRendering + this.lineRendering = Utils.NoNull(json.mapRendering) .filter(r => r["location"] === undefined) .map((r, i) => new LineRenderingConfig(r, context + ".mapRendering[" + i + "]")) @@ -304,6 +303,9 @@ export default class LayerConfig extends WithContextLoader { } public defaultIcon(): BaseUIElement | undefined { + if(this.mapRendering === undefined || this.mapRendering === null){ + return undefined; + } const mapRendering = this.mapRendering.filter(r => r.location.has("point"))[0] if (mapRendering === undefined) { return undefined diff --git a/UI/ShowDataLayer/ShowDataLayer.ts b/UI/ShowDataLayer/ShowDataLayer.ts index f306cadf2..6b700e79a 100644 --- a/UI/ShowDataLayer/ShowDataLayer.ts +++ b/UI/ShowDataLayer/ShowDataLayer.ts @@ -157,6 +157,7 @@ export default class ShowDataLayer { const coords = L.GeoJSON.coordsToLatLngs(feat.geometry.coordinates) const tagsSource = this.allElements?.addOrGetElement(feat) ?? new UIEventSource(feat.properties); let offsettedLine; + console.log("Rendering ", feat) tagsSource .map(tags => this._layerToShow.lineRendering[feat.lineRenderingIndex].GenerateLeafletStyle(tags)) .withEqualityStabilized((a, b) => { @@ -169,6 +170,7 @@ export default class ShowDataLayer { return a.offset === b.offset && a.color === b.color && a.weight === b.weight && a.dashArray === b.dashArray }) .addCallbackAndRunD(lineStyle => { + console.log("Linestyle is ", lineStyle) if (offsettedLine !== undefined) { self.geoLayer.removeLayer(offsettedLine) } diff --git a/assets/layers/bench/bench.json b/assets/layers/bench/bench.json index 47e629b03..a6ed25f7f 100644 --- a/assets/layers/bench/bench.json +++ b/assets/layers/bench/bench.json @@ -660,7 +660,8 @@ "render": "35,35,center" }, "location": [ - "point","centroid" + "point", + "centroid" ] } ] diff --git a/assets/layers/bike_cleaning/bike_cleaning.json b/assets/layers/bike_cleaning/bike_cleaning.json index f86e99058..ce484f3a9 100644 --- a/assets/layers/bike_cleaning/bike_cleaning.json +++ b/assets/layers/bike_cleaning/bike_cleaning.json @@ -160,7 +160,8 @@ ], "iconSize": "50,50,bottom", "location": [ - "point","centroid" + "point", + "centroid" ] } ] diff --git a/assets/layers/birdhide/birdhide.json b/assets/layers/birdhide/birdhide.json index 5c677264d..b0d0bbb85 100644 --- a/assets/layers/birdhide/birdhide.json +++ b/assets/layers/birdhide/birdhide.json @@ -307,7 +307,8 @@ ] }, "location": [ - "point","centroid" + "point", + "centroid" ] } ] diff --git a/assets/layers/cafe_pub/cafe_pub.json b/assets/layers/cafe_pub/cafe_pub.json index de6f5d2d5..9b6ab97a3 100644 --- a/assets/layers/cafe_pub/cafe_pub.json +++ b/assets/layers/cafe_pub/cafe_pub.json @@ -206,7 +206,8 @@ ] }, "location": [ - "point","centroid" + "point", + "centroid" ] } ] diff --git a/assets/layers/drinking_water/drinking_water.json b/assets/layers/drinking_water/drinking_water.json index ff52d6dac..37dfc5f34 100644 --- a/assets/layers/drinking_water/drinking_water.json +++ b/assets/layers/drinking_water/drinking_water.json @@ -183,7 +183,8 @@ ], "iconSize": "40,40,bottom", "location": [ - "point","centroid" + "point", + "centroid" ] } ] diff --git a/assets/layers/ghost_bike/ghost_bike.json b/assets/layers/ghost_bike/ghost_bike.json index 9ee4a5ea9..be4b2292e 100644 --- a/assets/layers/ghost_bike/ghost_bike.json +++ b/assets/layers/ghost_bike/ghost_bike.json @@ -205,7 +205,8 @@ "icon": "./assets/layers/ghost_bike/ghost_bike.svg", "iconSize": "40,40,bottom", "location": [ - "point","centroid" + "point", + "centroid" ] } ] diff --git a/assets/layers/gps_location/gps_location.json b/assets/layers/gps_location/gps_location.json index b4d330f80..5016797eb 100644 --- a/assets/layers/gps_location/gps_location.json +++ b/assets/layers/gps_location/gps_location.json @@ -10,7 +10,10 @@ { "icon": "crosshair:#00f", "iconSize": "40,40,center", - "location": ["point","centroid"] + "location": [ + "point", + "centroid" + ] } ] } \ No newline at end of file diff --git a/assets/layers/home_location/home_location.json b/assets/layers/home_location/home_location.json index c4dc31c0f..74276dc09 100644 --- a/assets/layers/home_location/home_location.json +++ b/assets/layers/home_location/home_location.json @@ -14,7 +14,10 @@ "iconSize": { "render": "20,20,center" }, - "location": ["point","centroid"] + "location": [ + "point", + "centroid" + ] } ] } \ No newline at end of file diff --git a/assets/layers/picnic_table/picnic_table.json b/assets/layers/picnic_table/picnic_table.json index 55c9dbf10..fd06f63f4 100644 --- a/assets/layers/picnic_table/picnic_table.json +++ b/assets/layers/picnic_table/picnic_table.json @@ -115,7 +115,8 @@ "render": "35,35,center" }, "location": [ - "point","centroid" + "point", + "centroid" ] } ] diff --git a/assets/layers/street_lamps/street_lamps.json b/assets/layers/street_lamps/street_lamps.json index 4924e0d75..a880d499b 100644 --- a/assets/layers/street_lamps/street_lamps.json +++ b/assets/layers/street_lamps/street_lamps.json @@ -25,7 +25,10 @@ }, "mapRendering": [ { - "location": ["point","centroid"], + "location": [ + "point", + "centroid" + ], "icon": "./assets/layers/street_lamps/street_lamp.svg", "iconBadges": [ { diff --git a/assets/layers/toilet/toilet.json b/assets/layers/toilet/toilet.json index 6847c801f..603105168 100644 --- a/assets/layers/toilet/toilet.json +++ b/assets/layers/toilet/toilet.json @@ -575,7 +575,8 @@ } ], "location": [ - "point","centroid" + "point", + "centroid" ] } ] diff --git a/assets/layers/tree_node/tree_node.json b/assets/layers/tree_node/tree_node.json index 38c9473da..03993c946 100644 --- a/assets/layers/tree_node/tree_node.json +++ b/assets/layers/tree_node/tree_node.json @@ -616,7 +616,8 @@ "render": "40,40,bottom" }, "location": [ - "point","centroid" + "point", + "centroid" ] } ] diff --git a/assets/layers/visitor_information_centre/visitor_information_centre.json b/assets/layers/visitor_information_centre/visitor_information_centre.json index 6f90b3d0f..8275a78c6 100644 --- a/assets/layers/visitor_information_centre/visitor_information_centre.json +++ b/assets/layers/visitor_information_centre/visitor_information_centre.json @@ -69,7 +69,8 @@ "render": "40,40,center" }, "location": [ - "point","centroid" + "point", + "centroid" ] } ] diff --git a/assets/layers/watermill/watermill.json b/assets/layers/watermill/watermill.json index 8f04d69da..2654f8232 100644 --- a/assets/layers/watermill/watermill.json +++ b/assets/layers/watermill/watermill.json @@ -172,7 +172,8 @@ "render": "50,50,center" }, "location": [ - "point","centroid" + "point", + "centroid" ] } ] diff --git a/assets/tagRenderings/questions.json b/assets/tagRenderings/questions.json index b460e4ca6..ce7bdbe11 100644 --- a/assets/tagRenderings/questions.json +++ b/assets/tagRenderings/questions.json @@ -2,9 +2,9 @@ "images": { "render": "{image_carousel()}{image_upload()}" }, -"export_as_gpx":{ - "render": "{export_as_gpx()}" -}, + "export_as_gpx": { + "render": "{export_as_gpx()}" + }, "wikipedia": { "render": "{wikipedia():max-height:25rem}", "question": { diff --git a/assets/themes/facadegardens/facadegardens.json b/assets/themes/facadegardens/facadegardens.json index 8a14c1eb9..2ec4c03bf 100644 --- a/assets/themes/facadegardens/facadegardens.json +++ b/assets/themes/facadegardens/facadegardens.json @@ -455,7 +455,8 @@ "render": "50,50,center" }, "location": [ - "point","centroid" + "point", + "centroid" ] } ] diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json index 78d60c7b0..4a435ae24 100644 --- a/assets/themes/hailhydrant/hailhydrant.json +++ b/assets/themes/hailhydrant/hailhydrant.json @@ -506,7 +506,8 @@ "render": "20,20,center" }, "location": [ - "point","centroid" + "point", + "centroid" ] } ] diff --git a/assets/themes/natuurpunt/natuurpunt.json b/assets/themes/natuurpunt/natuurpunt.json index de0ac462c..c1331540e 100644 --- a/assets/themes/natuurpunt/natuurpunt.json +++ b/assets/themes/natuurpunt/natuurpunt.json @@ -258,7 +258,8 @@ "badge": true } ] - } + }, + null ] } }, diff --git a/assets/themes/openwindpowermap/openwindpowermap.json b/assets/themes/openwindpowermap/openwindpowermap.json index 5f9163add..48d78c89b 100644 --- a/assets/themes/openwindpowermap/openwindpowermap.json +++ b/assets/themes/openwindpowermap/openwindpowermap.json @@ -272,7 +272,8 @@ }, "iconSize": "40, 40, bottom", "location": [ - "point","centroid" + "point", + "centroid" ] } ] diff --git a/assets/themes/street_lighting/street_lighting_assen.json b/assets/themes/street_lighting/street_lighting_assen.json index e6d8eb3ad..7f98cdcd7 100644 --- a/assets/themes/street_lighting/street_lighting_assen.json +++ b/assets/themes/street_lighting/street_lighting_assen.json @@ -36,7 +36,10 @@ "title": "Straatlantaarn in dataset", "mapRendering": [ { - "location": ["point","centroid"], + "location": [ + "point", + "centroid" + ], "icon": { "render": "circle:red", "mappings": [ diff --git a/assets/themes/uk_addresses/uk_addresses.json b/assets/themes/uk_addresses/uk_addresses.json index fa3df18b5..d2d8e223f 100644 --- a/assets/themes/uk_addresses/uk_addresses.json +++ b/assets/themes/uk_addresses/uk_addresses.json @@ -180,7 +180,8 @@ "render": "40,40,center" }, "location": [ - "point","centroid" + "point", + "centroid" ] } ], diff --git a/langs/layers/en.json b/langs/layers/en.json index 092a620e7..deaa1f5dd 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -2298,6 +2298,13 @@ "render": "Ghost bike" } }, + "gps_track": { + "tagRenderings": { + "Privacy notice": { + "render": "This is the path you've travelled since this website is opened. Don't worry - this is only visible to you and no one else. Your location data is never sent off-device." + } + } + }, "information_board": { "name": "Information boards", "presets": {