diff --git a/Models/Constants.ts b/Models/Constants.ts index 06ba69e91e..729d27f61c 100644 --- a/Models/Constants.ts +++ b/Models/Constants.ts @@ -2,7 +2,7 @@ import {Utils} from "../Utils"; export default class Constants { - public static vNumber = "0.13.0-alpha-3"; + public static vNumber = "0.13.0-alpha-4"; public static ImgurApiKey = '7070e7167f0a25a' public static readonly mapillary_client_token_v4 = "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85" diff --git a/UI/BigComponents/BackgroundMapSwitch.ts b/UI/BigComponents/BackgroundMapSwitch.ts index 16fd17bb3c..b675567fd5 100644 --- a/UI/BigComponents/BackgroundMapSwitch.ts +++ b/UI/BigComponents/BackgroundMapSwitch.ts @@ -186,7 +186,8 @@ export default class BackgroundMapSwitch extends Combine { currentBackground: currentBackground, notAvailable: activatePrevious }) - activatePrevious = button.activate + // Fall back to the first option: OSM + activatePrevious = activatePrevious ?? button.activate if (category === preferredCategory) { button.activate() } diff --git a/UI/Input/LocationInput.ts b/UI/Input/LocationInput.ts index 92120c6983..fe2f66bfe5 100644 --- a/UI/Input/LocationInput.ts +++ b/UI/Input/LocationInput.ts @@ -192,6 +192,7 @@ export default class LocationInput extends InputElement implements MinimapO if (this._snapTo !== undefined) { // Show the lines to snap to + console.log("Constructing the snap-to layer", this._snapTo) new ShowDataMultiLayer({ features: new StaticFeatureSource(this._snapTo, true), enablePopups: false, diff --git a/UI/ShowDataLayer/ShowDataMultiLayer.ts b/UI/ShowDataLayer/ShowDataMultiLayer.ts index 924274586f..374539b603 100644 --- a/UI/ShowDataLayer/ShowDataMultiLayer.ts +++ b/UI/ShowDataLayer/ShowDataMultiLayer.ts @@ -12,8 +12,9 @@ export default class ShowDataMultiLayer { new PerLayerFeatureSourceSplitter(options.layers, (perLayer => { const newOptions = { + ...options, layerToShow: perLayer.layer.layerDef, - ...options + features: perLayer } new ShowDataLayer(newOptions) }), diff --git a/assets/layers/entrance/entrance.json b/assets/layers/entrance/entrance.json index f90b730ecb..75f8e668ad 100644 --- a/assets/layers/entrance/entrance.json +++ b/assets/layers/entrance/entrance.json @@ -152,6 +152,13 @@ "nl": "Een tourniquet-deur (draaideur) die in een cylinder rond een centrale as draait" } }, + { + "if": "door=sliding", + "then": { + "en": "A sliding door where the door slides sidewards, typically parallel with a wall", + "nl": "Een schuifdeur or roldeur die bij het openen en sluiten zijwaarts beweegt" + } + }, { "if": "door=overhead", "then": { @@ -266,7 +273,7 @@ "title": "entrance", "preciseInput": { "preferredBackground": "photo", - "snapToLayer": "walls_and_buildings" + "snapToLayer": ["walls_and_buildings","pedestrian_path"] }, "tags": [ "entrance=yes" diff --git a/assets/layers/pedestrian_path/pedestrian_path.json b/assets/layers/pedestrian_path/pedestrian_path.json new file mode 100644 index 0000000000..40ecd67cf5 --- /dev/null +++ b/assets/layers/pedestrian_path/pedestrian_path.json @@ -0,0 +1,35 @@ +{ + "id": "pedestrian_path", + "name": { + "en": "Pedestrain paths" + }, + "minzoom": 18, + "source": { + "osmTags": { + "or": [ + "highway=footway", + "highway=path", + "highway=corridor", + "highway=steps" + ] + } + }, + "title": {}, + "description": { + "en": "Pedestrian footpaths, especially used for indoor navigation and snapping entrances to this layer" + }, + "mapRendering": [ + { + "icon": "./assets/svg/bug.svg", + "location": [ + "point" + ] + }, + { + "color": "#b33", + "width": 4, + "dashArray": "12 6" + } + ] +} + diff --git a/assets/themes/postal_codes/postal_codes.json b/assets/themes/postal_codes/postal_codes.json index 06b3e04960..c464cf4a90 100644 --- a/assets/themes/postal_codes/postal_codes.json +++ b/assets/themes/postal_codes/postal_codes.json @@ -84,6 +84,21 @@ }] } }, + { + "id": "wrong_postal_code", + "source": { + "osmTags": { + "and": ["boundary~*","addr:postcode~*"] + } + }, + "title": "Boundary relation with addr:postcode={addr:postcode}", + "mapRendering": [ + { + "color": "#f00", + "width": 1 + } + ] + }, { "id": "town_hall", "name": {