Version bump, fix bug with layers
This commit is contained in:
parent
5d4a2500c0
commit
8bf26ebc89
3 changed files with 12 additions and 9 deletions
|
@ -7,7 +7,6 @@ import {UIElement} from "../UI/UIElement";
|
||||||
import {LayerDefinition} from "../Customizations/LayerDefinition";
|
import {LayerDefinition} from "../Customizations/LayerDefinition";
|
||||||
|
|
||||||
import State from "../State";
|
import State from "../State";
|
||||||
import CodeGrid from "./Web/CodeGrid";
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* A filtered layer is a layer which offers a 'set-data' function
|
* A filtered layer is a layer which offers a 'set-data' function
|
||||||
|
@ -107,8 +106,15 @@ export class FilteredLayer {
|
||||||
const selfFeatures = [];
|
const selfFeatures = [];
|
||||||
for (let feature of geojson.features) {
|
for (let feature of geojson.features) {
|
||||||
// feature.properties contains all the properties
|
// feature.properties contains all the properties
|
||||||
|
|
||||||
const tags = TagUtils.proprtiesToKV(feature.properties);
|
const tags = TagUtils.proprtiesToKV(feature.properties);
|
||||||
|
|
||||||
|
if (!this.filters.matches(tags)) {
|
||||||
|
leftoverFeatures.push(feature);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const centerPoint = GeoOperations.centerpoint(feature);
|
const centerPoint = GeoOperations.centerpoint(feature);
|
||||||
if (feature.geometry.type !== "Point") {
|
if (feature.geometry.type !== "Point") {
|
||||||
if (this._wayHandling === LayerDefinition.WAYHANDLING_CENTER_AND_WAY) {
|
if (this._wayHandling === LayerDefinition.WAYHANDLING_CENTER_AND_WAY) {
|
||||||
|
@ -117,11 +123,8 @@ export class FilteredLayer {
|
||||||
feature = centerPoint;
|
feature = centerPoint;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.filters.matches(tags)) {
|
selfFeatures.push(feature);
|
||||||
selfFeatures.push(feature);
|
|
||||||
} else {
|
|
||||||
leftoverFeatures.push(feature);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
2
State.ts
2
State.ts
|
@ -23,7 +23,7 @@ export default class State {
|
||||||
// The singleton of the global state
|
// The singleton of the global state
|
||||||
public static state: 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
|
// The user journey states thresholds when a new feature gets unlocked
|
||||||
public static userJourney = {
|
public static userJourney = {
|
||||||
|
|
|
@ -25,6 +25,6 @@
|
||||||
"startZoom": 16,
|
"startZoom": 16,
|
||||||
"widenFactor": 0.05,
|
"widenFactor": 0.05,
|
||||||
"socialImage": "./assets/themes/cyclofix/logo.svg",
|
"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": []
|
"roamingRenderings": []
|
||||||
}
|
}
|
Loading…
Reference in a new issue