forked from MapComplete/MapComplete
More cleanup, first somewhat working version of #171
This commit is contained in:
parent
1f93923820
commit
bef684aec7
19 changed files with 439 additions and 135 deletions
|
@ -230,7 +230,7 @@ export default class GeoLocationHandler extends VariableUiElement {
|
|||
navigator?.permissions
|
||||
?.query({name: "geolocation"})
|
||||
?.then(function (status) {
|
||||
console.log("Geolocation is already", status);
|
||||
console.log("Geolocation permission is ", status.state);
|
||||
if (status.state === "granted") {
|
||||
self.StartGeolocating(forceZoom);
|
||||
}
|
||||
|
@ -289,7 +289,6 @@ export default class GeoLocationHandler extends VariableUiElement {
|
|||
|
||||
private StartGeolocating(zoomToGPS = true) {
|
||||
const self = this;
|
||||
console.log("Starting geolocation");
|
||||
|
||||
this._lastUserRequest = zoomToGPS ? new Date() : new Date(0);
|
||||
if (self._permission.data === "denied") {
|
||||
|
@ -301,8 +300,6 @@ export default class GeoLocationHandler extends VariableUiElement {
|
|||
this.MoveToCurrentLoction(16);
|
||||
}
|
||||
|
||||
console.log("Searching location using GPS");
|
||||
|
||||
if (self._isActive.data) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue