Skip to content

Commit 80c50b7

Browse files
committed
修改 上一次提交解决分段专题图判断最大值时没有包含等于时代码写的不正确问题。
1 parent 64cb71f commit 80c50b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/leaflet/overlay/RangeThemeLayer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ export var RangeThemeLayer = GeoFeatureThemeLayer.extend({
7575
//判断属性值是否属于styleGroups的某一个范围,以便对获取分组 style
7676
if (isSfInAttributes && isValidStyleGroup) {
7777
for (var i = 0, len = groups.length; i < len; i++) {
78-
if ((attribute >= groups[i].start) && (attribute <= groups[i].end)) {
78+
var isContianed = i === len-1 ? ((attribute >= groups[i].start) && (attribute <= groups[i].end)) : ((attribute >= groups[i].start) && (attribute < groups[i].end));
79+
if (isContianed) {
7980
var sty1 = groups[i].style;
8081
style = CommonUtil.copyAttributesWithClip(style, sty1);
8182
}

0 commit comments

Comments
 (0)