Make sure an initial GPS-fix is passed along as well
This commit is contained in:
parent
4de76136de
commit
dff270fc13
1 changed files with 2 additions and 7 deletions
|
@ -117,19 +117,14 @@ export default class GeoLocationHandler {
|
|||
|
||||
private CopyGeolocationIntoMapstate() {
|
||||
const state = this._state
|
||||
this.geolocationState.currentGPSLocation.addCallback((location) => {
|
||||
this.geolocationState.currentGPSLocation.addCallbackAndRunD((location) => {
|
||||
const feature = {
|
||||
type: "Feature",
|
||||
properties: <GeoLocationPointProperties>{
|
||||
id: "gps",
|
||||
"user:location": "yes",
|
||||
date: new Date().toISOString(),
|
||||
latitude: location.latitude,
|
||||
longitude: location.longitude,
|
||||
speed: location.speed,
|
||||
accuracy: location.accuracy,
|
||||
heading: location.heading,
|
||||
altitude: location.altitude,
|
||||
...location,
|
||||
},
|
||||
geometry: {
|
||||
type: "Point",
|
||||
|
|
Loading…
Reference in a new issue