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
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -192,6 +192,7 @@ export default class LocationInput extends InputElement<Loc> 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,
|
||||
|
|
|
@ -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)
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue