Fix questions: applicable mappings are now calculated dynamically; charging station theme now only shows applicable plugs based on the allowed vehicle types

This commit is contained in:
Pieter Vander Vennet 2021-10-02 15:16:41 +02:00
parent bedc576313
commit df34239256
14 changed files with 3677 additions and 3359 deletions

View file

@ -480,8 +480,11 @@ export class InitUiElements {
const bounds = State.state.currentBounds.data
const tilebbox = BBox.fromTileIndex(source.tileIndex)
if (!tilebbox.overlapsWith(bounds)) {
if(bounds === undefined){
// Map is not yet displayed
return false;
}
if (!source.bbox.overlapsWith(bounds)) {
// Not within range
return false
}