Skip to content

Commit

Permalink
去除坐标转换函数
Browse files Browse the repository at this point in the history
  • Loading branch information
Gayloc committed Aug 26, 2024
1 parent ce45677 commit 79e8b40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mapping campus, mapping life!

## 关于定位的说明

定位数据来自高德 JS API,使用我个人的开发者 API Key,目前仅使用浏览器定位一种服务,日配额 50,000 次。获取到的位置数据为 gjc02 坐标,再调用 `/utils/gcj02towgs84.js` 中的函数转换为 wgs84 坐标,再调用 `convertCoordinates` 函数转换为校园地图坐标。
定位数据来自高德 JS API,使用我个人的开发者 API Key,目前仅使用浏览器定位一种服务,日配额 50,000 次。获取到的位置调用 `convertCoordinates` 函数转换为校园地图坐标。

### 使用 wgs84 坐标 & 不使用高德地图组件的原因

Expand Down
2 changes: 1 addition & 1 deletion components/OpenMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const isInSchool = ([x, y]: number[]) => {
}
const geoSuccess = (position: any) => {
let [centerX, centerY] = convertCoordinates(gcj02towgs84(position.lng, position.lat))
let [centerX, centerY] = convertCoordinates([position.lng, position.lat])
//let [centerX, centerY] = convertCoordinates([115.804362, 28.663298])
if (isInSchool([centerX, centerY])) {
Expand Down

0 comments on commit 79e8b40

Please sign in to comment.