Skip to content

Commit c75d9bf

Browse files
committed
【bug】1) webmap解决分段时值为0的时候,未匹配成功。造成数据缺失
(reviewed by yuzy)
1 parent 3d5d4b6 commit c75d9bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,8 +1923,8 @@ export class WebMap extends ol.Observable {
19231923
//保留两位有效数
19241924
for (let key in segements) {
19251925
let value = segements[key];
1926-
if (key === 0) {
1927-
// 最小的值下舍入
1926+
if (Number(key) === 0) {
1927+
// 最小的值下舍入,要用两个等于号。否则有些值判断不对
19281928
value = Math.floor(value * 100) / 100;
19291929
} else {
19301930
// 其余上舍入

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