Skip to content

Commit dc44cf3

Browse files
committed
【feature】解决sonar检测的错误
1 parent 5e1b20a commit dc44cf3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,9 @@ export class WebMap extends ol.Observable {
11541154
let isMapService = info ? !info.isMvt : layer.layerType === 'HOSTED_TILE',
11551155
isAdded = false;
11561156
dataItemServices.forEach(function (service) {
1157-
if(isAdded) return;
1157+
if(isAdded) {
1158+
return;
1159+
}
11581160
//有服务了,就不需要循环
11591161
if(service && isMapService && service.serviceType === 'RESTMAP') {
11601162
isAdded = true;
@@ -1621,7 +1623,7 @@ export class WebMap extends ol.Observable {
16211623
featureClass: ol.Feature
16221624
});
16231625
//要加上这一句,否则坐标,默认都是3857
1624-
ol.format.MVT.prototype.readProjection = function (source) {
1626+
ol.format.MVT.prototype.readProjection = function () {
16251627
return new ol.proj.Projection({
16261628
code: '',
16271629
units: ol.proj.Units.TILE_PIXELS

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