Version bump, fix bug with layers

This commit is contained in:
Pieter Vander Vennet 2020-11-02 12:49:20 +01:00
parent 5d4a2500c0
commit 8bf26ebc89
3 changed files with 12 additions and 9 deletions

View file

@ -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);
}

View file

@ -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 = {

View file

@ -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": []
}