antv-l7/examples/raster/basic/demo/radar.js

26 lines
531 B
JavaScript
Raw Normal View History

2019-11-18 16:13:15 +08:00
import { Scene } from '@l7/scene';
import { ImageLayer } from '@l7/layers'
const scene = new Scene({
id: 'map',
pitch: 0,
type: 'amap',
style: 'dark',
center: [115.52680, 34.3628],
zoom: 7,
});
const layer = new ImageLayer({});
layer.source(
'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*8SUaRr7bxNsAAAAAAAAAAABkARQnAQ',
{
parser: {
type: 'image',
extent: [ 113.1277263548,32.3464238863, 118.1365790452, 36.4786759137 ]
},
},
);
scene.on('loaded',()=>{
scene.addLayer(layer);
})