Skip to content

Commit 0d1e215

Browse files
committed
【bug】兼容早期 火星坐标系 百度坐标系下的地图可以正常打开
1 parent 2fd1e24 commit 0d1e215

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,13 @@ export class WebMap extends ol.Observable {
157157
that.errorCallback && that.errorCallback(mapInfo.error, 'getMapFaild', that.map);
158158
return;
159159
}
160+
if(mapInfo.projection === 'EPSG:910111' || mapInfo.projection === 'EPSG:910112'){
161+
// 早期数据存在的自定义坐标系 "EPSG:910111": "GCJ02MERCATOR", "EPSG:910112": "BDMERCATOR"
162+
mapInfo.projection = "EPSG:3857";
163+
}else if(mapInfo.projection === 'EPSG:910101' || mapInfo.projection === 'EPSG:910102'){
164+
// 早期数据存在的自定义坐标系 "EPSG:910101": "GCJ02", "EPSG:910102": "BD",
165+
mapInfo.projection = "EPSG:4326";
166+
}
160167
that.baseProjection = mapInfo.projection;
161168
that.mapParams = {
162169
title: mapInfo.title,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy