Skip to content

Commit

Permalink
优化定位刷新
Browse files Browse the repository at this point in the history
  • Loading branch information
0xcaffebabe committed Aug 4, 2024
1 parent 42b2958 commit be2838d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function App() {
let coord = location
try {
const pos = await getPosition()
const coord = LocationUtils.wgs84togcj02(pos.coords.longitude, pos.coords.latitude)
coord = LocationUtils.wgs84togcj02(pos.coords.longitude, pos.coords.latitude) as [number, number]
LocationUtils.saveLastLocation(coord[0], coord[1])
setLocation([coord[0], coord[1]])
}catch(e) {
Expand Down

0 comments on commit be2838d

Please sign in to comment.