diff --git a/demos/vectorTile.html b/demos/vectorTile.html
index db74c5daf0..06b7983dbb 100644
--- a/demos/vectorTile.html
+++ b/demos/vectorTile.html
@@ -43,7 +43,7 @@ scene.on('loaded', () => {
// http://alipay-rmsdeploy-image.cn-hangzhou.alipay.aliyun-inc.com/thinkgis/tile/point/{z}/{x}/{y}.pbf
// https://mvt.amap.com/district/CHN2/8/203/105/4096?key=
- .source('http://alipay-rmsdeploy-image.cn-hangzhou.alipay.aliyun-inc.com/thinkgis/tile/china/all_point/{z}/{x}/{y}.pbf',{
+ .source('http://alipay-rmsdeploy-image.cn-hangzhou.alipay.aliyun-inc.com/thinkgis/tile/point2/{z}/{x}/{y}.pbf',{
parser:{
type: 'mvt',
sourceLayer:'layer',
diff --git a/demos/vectorTilepolygon.html b/demos/vectorTilepolygon.html
index 799ec23705..9780ad8624 100644
--- a/demos/vectorTilepolygon.html
+++ b/demos/vectorTilepolygon.html
@@ -35,47 +35,41 @@ const scene = new L7.Scene({
});
window.scene = scene;
var colorHash = new ColorHash();
+
scene.on('loaded', () => {
- const layer = scene.VectorTileLayer({
- zIndex:0,
- layerType:'polygon'
- })
- //.source('https://pre-lbs-show.taobao.com/gettile?x={x}&y={y}&z={z}&pipeId=pipe_vt_test')
-
- // http://alipay-rmsdeploy-image.cn-hangzhou.alipay.aliyun-inc.com/thinkgis/tile/point/{z}/{x}/{y}.pbf
- // https://mvt.amap.com/district/CHN2/8/203/105/4096?key=
- .source('http://alipay-rmsdeploy-image.cn-hangzhou.alipay.aliyun-inc.com/thinkgis/tile/china/village/{z}/{x}/{y}.pbf',{
+
+ const provinceSource = new L7.TileSource('http://alipay-rmsdeploy-image.cn-hangzhou.alipay.aliyun-inc.com/thinkgis/tile/china/province/{z}/{x}/{y}.pbf',{
parser:{
type: 'mvt',
sourceLayer:'layer',
idField:'code',
- maxZoom: 17,
+ maxZoom: 5,
}
+})
+console.log(provinceSource);
+ const layer = scene.VectorTileLayer({
+ zIndex:0,
+ layerType:'line'
})
+ .source(provinceSource)
.scale({
total:{
type:'linear',
min:0,
- max:5000
+ max:5000000
}
})
- .shape('fill')
+ .shape('line')
.size(2)
.active(false)
.color('total', ['#ffffe5','#fff7bc','#fee391','#fec44f','#fe9929','#ec7014','#cc4c02','#993404','#662506'])
.style({
opacity:1.0
})
- .render();
- layer.on('mousemove',(feature)=>{
- console.log(feature);
- })
- console.log(layer);
+ .render();
+
});
-//OBJECTID',(id)=>{
- // const index = id % 8;
- //return ['#9e0142','#d53e4f','#f46d43','#fdae61','#fee08b','#ffffbf','#e6f598','#abdda4','#66c2a5','#3288bd','#5e4fa2'][index];
- //}
+