Skip to content

Commit 05c1ac3

Browse files
committed
【bug】iportal中添加的wms地图,直接打开,webmap未出现的问题
(reviewed by songym)
1 parent 6d30d50 commit 05c1ac3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ export class WebMap extends ol.Observable {
172172
for (let key in oldcenter) {
173173
center.push(oldcenter[key]);
174174
}
175+
if(center.length === 0) {
176+
//兼容wms
177+
center = [0,0];
178+
}
175179
extent = [extent.leftBottom.x, extent.leftBottom.y, extent.rightTop.x, extent.rightTop.y];
176180
this.map.setView(new ol.View({
177181
zoom,

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