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

25 lines
490 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-14 11:50:12 +08:00
const scene = new Scene({
id: 'map',
map: new GaodeMap({
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
});
const layer = new ImageLayer({});
layer.source(
'https://gw.alipayobjects.com/zos/rmsportal/FnHFeFklTzKDdUESRNDv.jpg',
{
parser: {
type: 'image',
2019-11-20 17:26:24 +08:00
extent: [ 121.168, 30.2828, 121.384, 30.4219 ]
}
}
2019-11-14 11:50:12 +08:00
);
2019-11-21 17:52:18 +08:00
scene.addLayer(layer);