diff --git a/Logic/FilteredLayer.ts b/Logic/FilteredLayer.ts index 52eb462e9..257257ac0 100644 --- a/Logic/FilteredLayer.ts +++ b/Logic/FilteredLayer.ts @@ -7,7 +7,6 @@ import {UIElement} from "../UI/UIElement"; import {LayerDefinition} from "../Customizations/LayerDefinition"; import State from "../State"; -import CodeGrid from "./Web/CodeGrid"; /*** * A filtered layer is a layer which offers a 'set-data' function @@ -107,8 +106,15 @@ export class FilteredLayer { const selfFeatures = []; for (let feature of geojson.features) { // feature.properties contains all the properties - + const tags = TagUtils.proprtiesToKV(feature.properties); + + if (!this.filters.matches(tags)) { + leftoverFeatures.push(feature); + continue; + } + + const centerPoint = GeoOperations.centerpoint(feature); if (feature.geometry.type !== "Point") { if (this._wayHandling === LayerDefinition.WAYHANDLING_CENTER_AND_WAY) { @@ -117,11 +123,8 @@ export class FilteredLayer { feature = centerPoint; } } - if (this.filters.matches(tags)) { - selfFeatures.push(feature); - } else { - leftoverFeatures.push(feature); - } + selfFeatures.push(feature); + } diff --git a/State.ts b/State.ts index c2fb00c3e..0e115c6e7 100644 --- a/State.ts +++ b/State.ts @@ -23,7 +23,7 @@ export default class State { // The singleton of the global state public static state: State; - public static vNumber = "0.1.1b"; + public static vNumber = "0.1.1c"; // The user journey states thresholds when a new feature gets unlocked public static userJourney = { diff --git a/assets/themes/cyclofix/cyclofix.json b/assets/themes/cyclofix/cyclofix.json index 3f6befe4e..5623ebadd 100644 --- a/assets/themes/cyclofix/cyclofix.json +++ b/assets/themes/cyclofix/cyclofix.json @@ -25,6 +25,6 @@ "startZoom": 16, "widenFactor": 0.05, "socialImage": "./assets/themes/cyclofix/logo.svg", - "layers": ["bike_cafes", "bike_shops", "bike_repair_station", "drinking_water", "bike_themed_object"], + "layers": ["bike_cafes", "bike_shops", "bike_repair_station", "drinking_water", "bike_themed_object","bike_parking"], "roamingRenderings": [] } \ No newline at end of file