Refactoring: remove the Basemap, switch to Minimap everywhere

This commit is contained in:
Pieter Vander Vennet 2021-09-03 13:48:04 +02:00
parent 92e8f3f89d
commit b806c210a6
4 changed files with 61 additions and 105 deletions

View file

@ -73,6 +73,9 @@ export default class OverpassFeatureSource implements FeatureSource {
location.addCallback(() => {
self.update()
});
leafletMap.addCallbackAndRunD(_ => {
self.update();
})
}
public ForceRefresh() {
@ -143,7 +146,11 @@ export default class OverpassFeatureSource implements FeatureSource {
return;
}
const bounds = this._leafletMap.data.getBounds();
const bounds = this._leafletMap.data?.getBounds();
if(bounds === undefined){
console.log("Leaflet map not yet initialized; retrying later")
return;
}
const diff = this._layoutToUse.data.widenFactor;