More work on cyclestreet layout, add loading of layers depending on zoom level

This commit is contained in:
Pieter Vander Vennet 2020-08-28 03:16:21 +02:00
parent 3576a4b1e1
commit 9a5b35b9f3
17 changed files with 109 additions and 59 deletions

View file

@ -57,6 +57,7 @@ export class AllKnownLayouts {
continue;
}
this.allLayers[layer.id] = layer;
this.allLayers[layer.id.toLowerCase()] = layer;
all.layers.push(layer);
}
}
@ -64,6 +65,7 @@ export class AllKnownLayouts {
const allSets: Map<string, Layout> = new Map();
for (const layout of this.layoutsList) {
allSets[layout.name] = layout;
allSets[layout.name.toLowerCase()] = layout;
}
allSets[all.name] = all;
return allSets;

View file

@ -45,6 +45,7 @@ export interface LayerConfigJson {
width?: TagRenderingConfigJson;
overpassTags: string | { k: string, v: string }[];
wayHandling?: number,
widenFactor?: number,
presets: {
tags: string,
title: string | any,

View file

@ -106,6 +106,7 @@ export class LayerDefinition {
elementsToShow?: TagDependantUIElementConstructor[],
maxAllowedOverlapPercentage?: number,
wayHandling?: number,
widenFactor?: number,
style?: (tags: any) => {
color: string,
icon: any

View file

@ -13,7 +13,7 @@ export default class Cyclofix extends Layout {
constructor() {
super(
"cyclofix",
["en", "nl", "fr"],
["en", "nl", "fr","gl"],
Translations.t.cyclofix.title,
[new BikeServices(), new BikeShops(), new DrinkingWater(), new BikeParkings(), new BikeOtherShops(), new BikeCafes()],
16,