fix: 瓦片类型用坐标地理边界判断,蓝点直接存不转换

This commit is contained in:
xweiba
2026-08-05 22:44:02 +08:00
parent 542d74e94f
commit f9b137b0f7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -260,7 +260,7 @@ struct MapViewRepresentable: UIViewRepresentable {
parent.onViewportChanged(distance)
zoomLabel?.text = MapZoomMath.viewportScaleLabel(distanceMeters: distance)
updatePinPosition(on: mapView)
// 每次地图区域变化时更新瓦片坐标系类型
// 根据地图中心坐标地理位置判断瓦片类型(中国境内=GCJ-02,境外=WGS-84)
let c = mapView.centerCoordinate
CoordinateConverter.updateTileType(lat: c.latitude, lon: c.longitude)
// 同步蓝点坐标(避免 delegate 更新不及时导致 mapState.realtimeLocation 为 nil)