2019-11-07 00:52:03 +08:00
|
|
|
import { Scene } from '@l7/scene';
|
|
|
|
import { PointImageLayer } from '@l7/layers'
|
|
|
|
const scene = new Scene({
|
|
|
|
id: 'map',
|
|
|
|
type: 'amap',
|
2019-11-18 16:13:15 +08:00
|
|
|
style: 'dark',
|
2019-11-16 22:22:13 +08:00
|
|
|
center: [120.5969, 29.7918],
|
|
|
|
pitch: 35,
|
|
|
|
zoom: 7,
|
|
|
|
rotation: 4.183582
|
2019-11-07 00:52:03 +08:00
|
|
|
});
|
2019-11-14 17:25:16 +08:00
|
|
|
scene.addImage('00', 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*kzTMQqS2QdUAAAAAAAAAAABkARQnAQ');
|
|
|
|
scene.addImage('01', 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*jH1XRb7F7hMAAAAAAAAAAABkARQnAQ');
|
|
|
|
scene.addImage('02', 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*YaKSTr3L5i8AAAAAAAAAAABkARQnAQ');
|
|
|
|
scene.addImage('04', 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*dmniQrDpCYwAAAAAAAAAAABkARQnAQ');
|
|
|
|
scene.addImage('11', 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*YaKSTr3L5i8AAAAAAAAAAABkARQnAQ');
|
|
|
|
scene.addImage('15', 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*YNlXQYCIzroAAAAAAAAAAABkARQnAQ');
|
|
|
|
scene.addImage('07', 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*DccRTI6ZRLoAAAAAAAAAAABkARQnAQ');
|
|
|
|
scene.addImage('16', 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*iQKoS6I-rO8AAAAAAAAAAABkARQnAQ');
|
|
|
|
scene.addImage('06', 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*f-wyS7ad5p0AAAAAAAAAAABkARQnAQ');
|
|
|
|
scene.addImage('08', 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*lHhzQrOW4AQAAAAAAAAAAABkARQnAQ');
|
|
|
|
scene.addImage('17', 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*9Q0QS4GdaYcAAAAAAAAAAABkARQnAQ');
|
|
|
|
scene.addImage('05', 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*LyuVRowl6nAAAAAAAAAAAABkARQnAQ');
|
|
|
|
fetch('https://gw.alipayobjects.com/os/basement_prod/c6042c6b-45fd-4e2e-adf8-fdbf060441e8.json')
|
2019-11-07 00:52:03 +08:00
|
|
|
.then((res) => res.json())
|
|
|
|
.then((data) => {
|
2019-11-14 17:25:16 +08:00
|
|
|
|
2019-11-07 00:52:03 +08:00
|
|
|
const imageLayer = new PointImageLayer()
|
2019-11-14 17:25:16 +08:00
|
|
|
.source(data)
|
|
|
|
.shape('w', function(w) {
|
|
|
|
return w;
|
2019-11-07 00:52:03 +08:00
|
|
|
})
|
2019-11-18 16:13:15 +08:00
|
|
|
.size(15)
|
2019-11-07 00:52:03 +08:00
|
|
|
scene.addLayer(imageLayer);
|
|
|
|
});
|
|
|
|
|
|
|
|
|