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

26 lines
584 B
JavaScript
Raw Normal View History

2019-11-21 17:52:18 +08:00
import { Scene, ImageLayer } from '@antv/l7';
import { GaodeMap } from '@antv/l7-maps';
2019-11-18 16:13:15 +08:00
const scene = new Scene({
id: 'map',
map: new GaodeMap({
pitch: 0,
style: 'dark',
center: [ 115.5268, 34.3628 ],
2019-11-26 19:17:39 +08:00
zoom: 7
})
2019-11-18 16:13:15 +08:00
});
2020-03-15 20:09:16 +08:00
scene.on('loaded', () => {
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 ]
}
2019-11-20 17:26:24 +08:00
}
2020-03-15 20:09:16 +08:00
);
scene.addLayer(layer);
});