2019-11-21 17:52:18 +08:00
|
|
|
import { Scene, ImageLayer } from '@antv/l7';
|
2019-11-27 14:54:53 +08:00
|
|
|
import { GaodeMap } from '@antv/l7-maps';
|
2019-11-26 17:51:29 +08:00
|
|
|
|
2019-11-18 16:13:15 +08:00
|
|
|
const scene = new Scene({
|
|
|
|
id: 'map',
|
2019-11-27 14:54:53 +08:00
|
|
|
map: new GaodeMap({
|
2019-11-26 17:51:29 +08:00
|
|
|
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);
|
|
|
|
});
|