forked from MapComplete/MapComplete
		
	Wait for loading of AccuratePosition script.
This commit is contained in:
		
							parent
							
								
									de305ecab9
								
							
						
					
					
						commit
						d7d7952111
					
				
					 2 changed files with 8 additions and 1 deletions
				
			
		|  | @ -17,6 +17,14 @@ export class GeoLocationHandler extends UIElement { | |||
|     constructor() { | ||||
|         super(undefined); | ||||
|         this._hasLocation = State.state.currentGPSLocation.map((location) => location !== undefined); | ||||
|         var self = this; | ||||
|         import("../../vendor/Leaflet.AccuratePosition.js").then(() => { | ||||
|             self.init(); | ||||
|         }) | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     public init() { | ||||
|         this.ListenTo(this._hasLocation); | ||||
|         this.ListenTo(this._isActive); | ||||
|         this.ListenTo(this._permission); | ||||
|  |  | |||
|  | @ -65,7 +65,6 @@ | |||
| <div id="leafletDiv"></div> | ||||
| 
 | ||||
| <script src="./index.ts"></script> | ||||
| <script src="./vendor/Leaflet.AccuratePosition.js"></script> | ||||
| 
 | ||||
| <script data-goatcounter="https://pietervdvn.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script> | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue