Add pedestrian paths to entrance-layer, fix rendering in location-input element, fallback to OSM if map layer is not available
This commit is contained in:
parent
fc2ede2259
commit
f29c62ab19
7 changed files with 64 additions and 4 deletions
|
@ -2,7 +2,7 @@ import {Utils} from "../Utils";
|
||||||
|
|
||||||
export default class Constants {
|
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 ImgurApiKey = '7070e7167f0a25a'
|
||||||
public static readonly mapillary_client_token_v4 = "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85"
|
public static readonly mapillary_client_token_v4 = "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85"
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,8 @@ export default class BackgroundMapSwitch extends Combine {
|
||||||
currentBackground: currentBackground,
|
currentBackground: currentBackground,
|
||||||
notAvailable: activatePrevious
|
notAvailable: activatePrevious
|
||||||
})
|
})
|
||||||
activatePrevious = button.activate
|
// Fall back to the first option: OSM
|
||||||
|
activatePrevious = activatePrevious ?? button.activate
|
||||||
if (category === preferredCategory) {
|
if (category === preferredCategory) {
|
||||||
button.activate()
|
button.activate()
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,6 +192,7 @@ export default class LocationInput extends InputElement<Loc> implements MinimapO
|
||||||
if (this._snapTo !== undefined) {
|
if (this._snapTo !== undefined) {
|
||||||
|
|
||||||
// Show the lines to snap to
|
// Show the lines to snap to
|
||||||
|
console.log("Constructing the snap-to layer", this._snapTo)
|
||||||
new ShowDataMultiLayer({
|
new ShowDataMultiLayer({
|
||||||
features: new StaticFeatureSource(this._snapTo, true),
|
features: new StaticFeatureSource(this._snapTo, true),
|
||||||
enablePopups: false,
|
enablePopups: false,
|
||||||
|
|
|
@ -12,8 +12,9 @@ export default class ShowDataMultiLayer {
|
||||||
|
|
||||||
new PerLayerFeatureSourceSplitter(options.layers, (perLayer => {
|
new PerLayerFeatureSourceSplitter(options.layers, (perLayer => {
|
||||||
const newOptions = {
|
const newOptions = {
|
||||||
|
...options,
|
||||||
layerToShow: perLayer.layer.layerDef,
|
layerToShow: perLayer.layer.layerDef,
|
||||||
...options
|
features: perLayer
|
||||||
}
|
}
|
||||||
new ShowDataLayer(newOptions)
|
new ShowDataLayer(newOptions)
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -152,6 +152,13 @@
|
||||||
"nl": "Een tourniquet-deur (draaideur) die in een cylinder rond een centrale as draait"
|
"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",
|
"if": "door=overhead",
|
||||||
"then": {
|
"then": {
|
||||||
|
@ -266,7 +273,7 @@
|
||||||
"title": "entrance",
|
"title": "entrance",
|
||||||
"preciseInput": {
|
"preciseInput": {
|
||||||
"preferredBackground": "photo",
|
"preferredBackground": "photo",
|
||||||
"snapToLayer": "walls_and_buildings"
|
"snapToLayer": ["walls_and_buildings","pedestrian_path"]
|
||||||
},
|
},
|
||||||
"tags": [
|
"tags": [
|
||||||
"entrance=yes"
|
"entrance=yes"
|
||||||
|
|
35
assets/layers/pedestrian_path/pedestrian_path.json
Normal file
35
assets/layers/pedestrian_path/pedestrian_path.json
Normal file
|
@ -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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
|
@ -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",
|
"id": "town_hall",
|
||||||
"name": {
|
"name": {
|
||||||
|
|
Loading…
Reference in a new issue