diff --git a/demos/03_choropleths_polygon.html b/demos/03_choropleths_polygon.html index a4dee381b4..130c79ac28 100644 --- a/demos/03_choropleths_polygon.html +++ b/demos/03_choropleths_polygon.html @@ -17,8 +17,25 @@
- + +
+

+ +

+

+ +

+

+
+ @@ -35,7 +52,7 @@ const colorObj ={ const scene = new L7.Scene({ id: 'map', - mapStyle: 'light', // 样式URL + mapStyle: 'dark', // 样式URL center: [104.838088,34.075889 ], pitch: 0, zoom: 4.5, @@ -82,6 +99,19 @@ scene.on('loaded', () => { $("#info").css({'left': e.pixel.x,'top':e.pixel.y, display:'block'}); $("#info").html(`

${e.feature.properties.area || e.feature.properties.name }${e.feature.properties.pm2_5_24h || 0}

`); }) + $('.info-panel input').change(function(){ + $(this).next().text($(this).val()); + const min = $('.info-panel input').val(); + const max = $($('.info-panel input')[1]).val(); + citylayer.filter('pm2_5_24h',(value)=>{ + return (value>=min && value<=max) + }).render(); + }) + $('.info-panel select').change(function(){ + const color = $(this).val(); + citylayer.color('pm2_5_24h',colorObj[color]).render(); + console.timeEnd('color') + }) }); }); diff --git a/demos/05_raster_dem.html b/demos/05_raster_dem.html index d490a48dcc..0589eed6b4 100644 --- a/demos/05_raster_dem.html +++ b/demos/05_raster_dem.html @@ -63,6 +63,12 @@ scene.on('loaded', () => { } }) .render(); + setTimeout(()=>{ + layer.style({ + rampColors: 'viridis', + }).render(); + },3000) + } }; xhr.send(); diff --git a/demos/taxi.html b/demos/taxi.html index 45c19dd0df..163a78b865 100644 --- a/demos/taxi.html +++ b/demos/taxi.html @@ -48,7 +48,7 @@ const scene = new L7.Scene({ maxZoom: 18 }); scene.on('loaded', () => { - $.get('./data/road.json', data => { + $.get('https://gw.alipayobjects.com/os/rmsportal/kNDVHmyUWAKhWmWXmjxM.json', data => { scene.LineLayer({ zIndex: 2 })