mirror of https://gitee.com/antv-l7/antv-l7
fix(taxi):update build
This commit is contained in:
parent
7ee686d6ed
commit
f5a91f16f4
|
@ -17,8 +17,25 @@
|
|||
|
||||
<body>
|
||||
<div id="map"></div>
|
||||
<div id ="info" class ="tooltip" style="display:none">
|
||||
</div>
|
||||
<div id ="info" class ="tooltip" style="display:none"></div>
|
||||
<div class='info-panel top-right'>
|
||||
<p>
|
||||
<label>min</label><input name="minaqi" type="range" step="1" min="0" max="200" value=0> <label>0</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>max</label><input name="maxaqi" type="range" step="1" min="0" max="300" value=300><label>300</label>
|
||||
</p>
|
||||
<p><label>color</label><select>
|
||||
<option value ="default">default</option>
|
||||
<option value ="blue">blue</option>
|
||||
<option value ="red">red</option>
|
||||
<option value="orange">orange</option>
|
||||
<option value="green">green</option>
|
||||
<option value="yellow">yellow</option>
|
||||
<option value="purple">purple</option>
|
||||
</select> </p>
|
||||
<div>
|
||||
|
||||
<script src="https://webapi.amap.com/maps?v=1.4.8&key=15cd8a57710d40c9b7c0e3cc120f1200&plugin=Map3D"></script>
|
||||
<script src="./assets/jquery-3.2.1.min.js"></script>
|
||||
<script src="./assets/dat.gui.min.js"></script>
|
||||
|
@ -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(`<p>${e.feature.properties.area || e.feature.properties.name }<span">${e.feature.properties.pm2_5_24h || 0}</span></p>`);
|
||||
})
|
||||
$('.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')
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -63,6 +63,12 @@ scene.on('loaded', () => {
|
|||
}
|
||||
})
|
||||
.render();
|
||||
setTimeout(()=>{
|
||||
layer.style({
|
||||
rampColors: 'viridis',
|
||||
}).render();
|
||||
},3000)
|
||||
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
|
|
|
@ -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
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue