Skip to content

Commit bebae79

Browse files
[fix]sonar map和===报错 review by xiongjj
1 parent 5b7d703 commit bebae79

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ export class WebMap extends Observable {
421421
let scales = [], resolutions = {}, res, scale, resolutionArray = [],
422422
coordUnit = baseLayerInfo.coordUnit || olProj.get(baseLayerInfo.projection).getUnits();
423423
if (!coordUnit) {
424-
coordUnit = this.baseProjection === "EPSG:3857" ? "m" : "degree";
424+
coordUnit = this.baseProjection == "EPSG:3857" ? "m" : "degree";
425425
}
426426
if (baseLayerInfo.visibleScales && baseLayerInfo.visibleScales.length > 0) {
427427
//底部设置过固定比例尺,则使用设置的

src/openlayers/overlay/vectortile/VectorTileStyles.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export class VectorTileStyles extends Observable {
108108
}
109109
var cartoShadersArray = new CartoCSS(cartoCss).getShaders();
110110
var cartoShaders = {};
111-
cartoShadersArray.map(function (cartoShader) {
111+
cartoShadersArray.forEach(function (cartoShader) {
112112
cartoShaders[cartoShader.elements[0].clean] = cartoShaders[cartoShader.elements[0].clean] || {};
113113
cartoShaders[cartoShader.elements[0].clean][cartoShader.attachment] = cartoShaders[cartoShader.elements[0].clean][cartoShader.attachment] || [];
114114
cartoShaders[cartoShader.elements[0].clean][cartoShader.attachment].push(cartoShader);
@@ -122,7 +122,7 @@ export class VectorTileStyles extends Observable {
122122
if (VectorTileStyles.getCartoCss()) {
123123
var clientCartoShadersArray = new CartoCSS(VectorTileStyles.getCartoCss()).getShaders();
124124
var clientCartoShaders = {};
125-
clientCartoShadersArray.map(function (cartoShader) {
125+
clientCartoShadersArray.forEach(function (cartoShader) {
126126
clientCartoShaders[cartoShader.elements[0].clean] = clientCartoShaders[cartoShader.elements[0].clean] || {};
127127
clientCartoShaders[cartoShader.elements[0].clean][cartoShader.attachment] = clientCartoShaders[cartoShader.elements[0].clean][cartoShader.attachment] || [];
128128
clientCartoShaders[cartoShader.elements[0].clean][cartoShader.attachment].push(cartoShader);

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