2019-11-27 14:54:53 +08:00
|
|
|
import { Scale, Zoom, Scene } from '@antv/l7';
|
2019-11-28 00:26:09 +08:00
|
|
|
import { Mapbox } from '@antv/l7-maps';
|
2019-11-27 14:54:53 +08:00
|
|
|
const scene = new Scene({
|
|
|
|
id: 'map',
|
2019-11-28 00:26:09 +08:00
|
|
|
map: new Mapbox({
|
|
|
|
style: 'light',
|
|
|
|
pitch: 0,
|
|
|
|
center: [ 107.054293, 35.246265 ],
|
|
|
|
zoom: 4.056
|
|
|
|
})
|
2019-11-27 14:54:53 +08:00
|
|
|
});
|
2020-03-15 20:09:16 +08:00
|
|
|
scene.on('loaded', () => {
|
|
|
|
const zoomControl = new Zoom();
|
|
|
|
const scaleControl = new Scale();
|
|
|
|
scene.addControl(zoomControl);
|
|
|
|
scene.addControl(scaleControl);
|
|
|
|
});
|