Fix geolocalisation bugs on webkit

This commit is contained in:
Pieter Vander Vennet 2020-07-29 20:55:25 +02:00
parent 7a9c21f83d
commit 2913c28271
3 changed files with 4 additions and 3 deletions

View file

@ -65,8 +65,8 @@ export class GeoLocationHandler extends UIElement {
self._marker = newMarker;
});
navigator.permissions.query({name: 'geolocation'})
.then(function (status) {
navigator?.permissions?.query({name: 'geolocation'})
?.then(function (status) {
console.log("Geolocation is already", status)
if (status.state === "granted") {
self.StartGeolocating();

View file

@ -32,6 +32,7 @@ export class OsmConnection {
this.userDetails.data.dryRun = dryRun;
this._dryRun = dryRun;
if (this.auth.authenticated()) {
this.AttemptLogin(); // Also updates the user badge
}else{

View file

@ -47,7 +47,7 @@
<div id="leafletDiv"></div>
<script src="./index.ts"></script>
<script src="vendor/Leaflet.AccuratePosition.js"></script>
<script src="./vendor/Leaflet.AccuratePosition.js"></script>
<script data-goatcounter="https://pietervdvn.goatcounter.com/count"
async src="//gc.zgo.at/count.js"></script>