ryuyoonju
07-30
240730 류윤주 위치추적 수정
@bdf69b2277f5d159b66ff5af16a800286e8c8193
--- src/screen/GpsScreen.js
+++ src/screen/GpsScreen.js
... | ... | @@ -139,15 +139,15 @@ |
139 | 139 |
setLocationData(prevData => ({ |
140 | 140 |
latitude: [...prevData.latitude, latitude], |
141 | 141 |
longitude: [...prevData.longitude, longitude], |
142 |
- timestamp: [...prevData.timestamp, time] |
|
142 |
+ timestamp: [...prevData.timestamp, timestamp] |
|
143 | 143 |
})); |
144 | 144 |
|
145 |
- console.log('위치 업데이트:', { latitude, longitude, timestamp: time }); |
|
145 |
+ console.log('위치 업데이트:', { latitude, longitude, timestamp: timestamp }); |
|
146 | 146 |
}, |
147 | 147 |
(error) => { |
148 | 148 |
console.error('위치 감시 중 오류:', error); |
149 | 149 |
}, |
150 |
- { enableHighAccuracy: true, distanceFilter: 0, interval: 2000 } |
|
150 |
+ { enableHighAccuracy: true, distanceFilter: 0, interval: 1000, fastestInterval: 1000, forceRequestLocation: true } |
|
151 | 151 |
); |
152 | 152 |
|
153 | 153 |
setWatchId(id); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?