forked from MapComplete/MapComplete
Add bigger zoom-in and zoom-out button, move attribution to button on small screens
This commit is contained in:
parent
2572e99b95
commit
604d7863fe
13 changed files with 142 additions and 66 deletions
|
@ -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 "";
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue