Skip to content

Commit 8f16a21

Browse files
修复 mapv 在大比例偏移,优化 mapboxgl maplibregl 示例
1 parent 7ba1af4 commit 8f16a21

39 files changed

+85
-116
lines changed

examples/mapboxgl/mapvBeijingVillage.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@
7878
lineWidth: 1,
7979
draw: 'simple'
8080
};
81-
//mapboxgl.supermap.MapvLayer 构造函数的第一个 map 参数将在下个版本遗弃
82-
var mapVLayer = new mapboxgl.supermap.MapvLayer("", dataSet, options);
81+
var mapVLayer = new mapboxgl.supermap.MapvLayer(dataSet, options);
8382
map.addLayer(mapVLayer);
8483
});
8584

examples/mapboxgl/mapvCsvcar.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@
7676
};
7777
var dataSet = mapv.csv.getDataSet(csvstr);
7878

79-
//mapboxgl.supermap.MapvLayer 构造函数的第一个 map 参数将在下个版本遗弃
80-
var mapVLayer = new mapboxgl.supermap.MapvLayer("", dataSet, options);
79+
var mapVLayer = new mapboxgl.supermap.MapvLayer(dataSet, options);
8180
map.addLayer(mapVLayer);
8281
});
8382
</script>

examples/mapboxgl/mapvLayerHoneycomb.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@
141141
};
142142

143143
//创建MapV图层
144-
//mapboxgl.supermap.MapvLayer 构造函数的第一个 map 参数将在下个版本遗弃
145-
var mapVLayer = new mapboxgl.supermap.MapvLayer('', dataSet, options);
144+
var mapVLayer = new mapboxgl.supermap.MapvLayer(dataSet, options);
146145
map.addLayer(mapVLayer);
147146
}
148147
</script>

examples/mapboxgl/mapvLayerPolyon.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@
9494
globalAlpha: 0.8,
9595
draw: 'intensity'
9696
};
97-
//mapboxgl.supermap.MapvLayer 构造函数的第一个 map 参数将在下个版本遗弃
98-
var mapVLayer1 = new mapboxgl.supermap.MapvLayer("", dataSet1, options);
97+
var mapVLayer1 = new mapboxgl.supermap.MapvLayer(dataSet1, options);
9998
map.addLayer(mapVLayer1);
10099

101100
var data2 = [];
@@ -121,8 +120,7 @@
121120
zIndex: 11,
122121
shadowBlur: 10
123122
};
124-
//mapboxgl.supermap.MapvLayer 构造函数的第一个 map 参数将在下个版本遗弃
125-
var mapVLayer2 = new mapboxgl.supermap.MapvLayer("", dataSet2, textOptions);
123+
var mapVLayer2 = new mapboxgl.supermap.MapvLayer(dataSet2, textOptions);
126124
map.addLayer(mapVLayer2);
127125

128126
setTimeout(function () {

examples/mapboxgl/mapvLayerPolyon_4326.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@
9191
globalAlpha: 0.8,
9292
draw: 'intensity'
9393
};
94-
//mapboxgl.supermap.MapvLayer 构造函数的第一个 map 参数将在下个版本遗弃
95-
var mapVLayer1 = new mapboxgl.supermap.MapvLayer("", dataSet1, options);
94+
var mapVLayer1 = new mapboxgl.supermap.MapvLayer(dataSet1, options);
9695
map.addLayer(mapVLayer1);
9796

9897
var data2 = [];
@@ -116,8 +115,7 @@
116115
zIndex: 11,
117116
shadowBlur: 10
118117
};
119-
//mapboxgl.supermap.MapvLayer 构造函数的第一个 map 参数将在下个版本遗弃
120-
var mapVLayer2 = new mapboxgl.supermap.MapvLayer("", dataSet2, textOptions);
118+
var mapVLayer2 = new mapboxgl.supermap.MapvLayer(dataSet2, textOptions);
121119
map.addLayer(mapVLayer2);
122120
});
123121
});

examples/mapboxgl/mapvLinanJiaData.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ <h2 id="title" data-i18n="resources.title_lianjia"></h2>
150150
}
151151
};
152152
var popup = new mapboxgl.Popup({closeOnClick: false});
153-
//mapboxgl.supermap.MapvLayer 构造函数的第一个 map 参数将在下个版本遗弃
154-
var mapVLayer = new mapboxgl.supermap.MapvLayer("", dataSet, mapvOptions);
153+
var mapVLayer = new mapboxgl.supermap.MapvLayer(dataSet, mapvOptions);
155154
map.addLayer(mapVLayer);
156155
});
157156
}

examples/mapboxgl/mapvNyTaxi.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@
7373
dataSet.initGeometry();
7474
$('#loading').hide();
7575

76-
layer = new mapboxgl.supermap.MapvLayer("", dataSet, options);
77-
//mapboxgl.supermap.MapvLayer 构造函数的第一个 map 参数将在下个版本遗弃
76+
layer = new mapboxgl.supermap.MapvLayer(dataSet, options);
7877
map.addLayer(layer);
7978

8079
$('#loading').hide();

examples/mapboxgl/mapvPolylineIntensity.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@
9595
max: 30,
9696
draw: 'intensity'
9797
};
98-
//mapboxgl.supermap.MapvLayer 构造函数的第一个 map 参数将在下个版本遗弃
99-
var mapVlayer = new mapboxgl.supermap.MapvLayer("", dataSet, options);
98+
map.on('load', function() {
99+
var mapVlayer = new mapboxgl.supermap.MapvLayer(dataSet, options);
100100
map.addLayer(mapVlayer);
101+
})
101102

102103
</script>
103104
</body>

examples/mapboxgl/mapvPolylineSimple.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@
131131
lineWidth: 0.7,
132132
draw: 'simple'
133133
};
134-
//mapboxgl.supermap.MapvLayer 构造函数的第一个 map 参数将在下个版本遗弃
135-
var mapVlayer = new mapboxgl.supermap.MapvLayer('', dataSet, options);
134+
var mapVlayer = new mapboxgl.supermap.MapvLayer(dataSet, options);
136135
map.addLayer(mapVlayer);
137136
});
138137
</script>

examples/mapboxgl/mapvPolylineTime.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@
117117
draw: 'simple'
118118
};
119119

120-
//mapboxgl.supermap.MapvLayer 构造函数的第一个 map 参数将在下个版本遗弃
121-
var mapVlayer = new mapboxgl.supermap.MapvLayer("", dataSet, options);
120+
var mapVlayer = new mapboxgl.supermap.MapvLayer(dataSet, options);
122121
map.addLayer(mapVlayer);
123122

124123
var dataSet2 = new mapv.DataSet(timeData);
@@ -139,8 +138,7 @@
139138
draw: 'simple'
140139
};
141140

142-
//mapboxgl.supermap.MapvLayer 构造函数的第一个 map 参数将在下个版本遗弃
143-
var mapVlayer2 = new mapboxgl.supermap.MapvLayer("", dataSet2, options2);
141+
var mapVlayer2 = new mapboxgl.supermap.MapvLayer(dataSet2, options2);
144142
map.addLayer(mapVlayer2);
145143
});
146144

0 commit comments

Comments
 (0)