Add bigger zoom-in and zoom-out button, move attribution to button on small screens

This commit is contained in:
Pieter Vander Vennet 2021-02-21 03:38:12 +01:00
parent 2572e99b95
commit 604d7863fe
13 changed files with 142 additions and 66 deletions

View file

@ -20,6 +20,7 @@ export default class GeoLocationHandler extends UIElement {
this._currentGPSLocation = currentGPSLocation;
this._leafletMap = leafletMap;
this._hasLocation = currentGPSLocation.map((location) => location !== undefined);
this.dumbMode = false;
const self = this;
import("../../vendor/Leaflet.AccuratePosition.js").then(() => {
self.init();
@ -117,6 +118,7 @@ export default class GeoLocationHandler extends UIElement {
private StartGeolocating(zoomlevel = 19) {
const self = this;
console.log("Starting geolocation")
const map: any = this._leafletMap.data;
if (self._permission.data === "denied") {
return "";

View file

@ -18,7 +18,9 @@ export default class SelectedFeatureHandler {
this._featureSource = featureSource;
const self = this;
hash.addCallback(h => {
console.log("Hash is now ", h)
if (h === undefined || h === "") {
console.log("Deselecting feature...")
selectedFeature.setData(undefined);
}else{
self.selectFeature();