Skip to content

Commit d2804b7

Browse files
committed
【fix】修复4214不出图问题,proj4>=2.7.5不需要转坐标顺序
1 parent 60f6191 commit d2804b7

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/common/mapping/WebMapV2.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo }) {
190190
this.fire('mapcreatefailed', { error });
191191
}
192192
} else {
193-
this._defineProj4(projection);
193+
wkt = mapRepo.CRS.get(this.baseProjection).WKT
194+
this._defineProj4(wkt);
194195
bounds = [
195196
mapInfo.extent.leftBottom.x,
196197
mapInfo.extent.leftBottom.y,
@@ -2674,16 +2675,16 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo }) {
26742675
return styleParameters;
26752676
}
26762677

2677-
_unproject(point, isReverse = true) {
2678+
_unproject(point) {
26782679
const sourceProjection = this._unprojectProjection || this.baseProjection;
26792680
if (sourceProjection === 'EPSG:4326') {
26802681
return point;
26812682
}
26822683
const coor = transformCoodinates({ coordinates: point, sourceProjection, proj4: this.specifiedProj4 });
2683-
const proj = getProjection(sourceProjection, this.specifiedProj4);
2684-
if (isReverse && proj.axis && proj.axis.indexOf('ne') === 0) {
2685-
coor.reverse();
2686-
}
2684+
// const proj = getProjection(sourceProjection, this.specifiedProj4);
2685+
// if (isReverse && proj.axis && proj.axis.indexOf('ne') === 0) {
2686+
// coor.reverse();
2687+
// }
26872688
return coor;
26882689
}
26892690

0 commit comments

Comments
 (0)