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-14 11:50:12 +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: 'light',
|
|
|
|
center: [ 121.268, 30.3628 ],
|
2019-11-26 19:17:39 +08:00
|
|
|
zoom: 13
|
|
|
|
})
|
2019-11-14 11:50:12 +08:00
|
|
|
});
|
2020-03-15 20:09:16 +08:00
|
|
|
scene.on('loaded', () => {
|
|
|
|
const layer = new ImageLayer({});
|
|
|
|
layer.source(
|
|
|
|
'https://gw.alipayobjects.com/zos/rmsportal/FnHFeFklTzKDdUESRNDv.jpg',
|
|
|
|
{
|
|
|
|
parser: {
|
|
|
|
type: 'image',
|
|
|
|
extent: [ 121.168, 30.2828, 121.384, 30.4219 ]
|
|
|
|
}
|
2019-11-20 17:26:24 +08:00
|
|
|
}
|
2020-03-15 20:09:16 +08:00
|
|
|
);
|
|
|
|
scene.addLayer(layer);
|
|
|
|
});
|