forked from MapComplete/MapComplete
		
	Fix geolocalisation bugs on webkit
This commit is contained in:
		
							parent
							
								
									7a9c21f83d
								
							
						
					
					
						commit
						2913c28271
					
				
					 3 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
					@ -65,8 +65,8 @@ export class GeoLocationHandler extends UIElement {
 | 
				
			||||||
            self._marker = newMarker;
 | 
					            self._marker = newMarker;
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        navigator.permissions.query({name: 'geolocation'})
 | 
					        navigator?.permissions?.query({name: 'geolocation'})
 | 
				
			||||||
            .then(function (status) {
 | 
					            ?.then(function (status) {
 | 
				
			||||||
                console.log("Geolocation is already", status)
 | 
					                console.log("Geolocation is already", status)
 | 
				
			||||||
                if (status.state === "granted") {
 | 
					                if (status.state === "granted") {
 | 
				
			||||||
                    self.StartGeolocating();
 | 
					                    self.StartGeolocating();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,6 +32,7 @@ export class OsmConnection {
 | 
				
			||||||
        this.userDetails.data.dryRun = dryRun;
 | 
					        this.userDetails.data.dryRun = dryRun;
 | 
				
			||||||
        this._dryRun = dryRun;
 | 
					        this._dryRun = dryRun;
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (this.auth.authenticated()) {
 | 
					        if (this.auth.authenticated()) {
 | 
				
			||||||
            this.AttemptLogin(); // Also updates the user badge
 | 
					            this.AttemptLogin(); // Also updates the user badge
 | 
				
			||||||
        }else{
 | 
					        }else{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -47,7 +47,7 @@
 | 
				
			||||||
<div id="leafletDiv"></div>
 | 
					<div id="leafletDiv"></div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script src="./index.ts"></script>
 | 
					<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"
 | 
					<script data-goatcounter="https://pietervdvn.goatcounter.com/count"
 | 
				
			||||||
        async src="//gc.zgo.at/count.js"></script>
 | 
					        async src="//gc.zgo.at/count.js"></script>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue