2019-11-25 15:27:56 +08:00
|
|
|
import { Scale, Zoom, Scene } from '@antv/l7';
|
2019-11-06 11:57:42 +08:00
|
|
|
const scene = new Scene({
|
|
|
|
id: 'map',
|
|
|
|
pitch: 0,
|
2019-11-07 00:52:03 +08:00
|
|
|
type: 'mapbox',
|
2019-11-06 11:57:42 +08:00
|
|
|
style: 'light',
|
2019-11-10 21:20:26 +08:00
|
|
|
center: [-97.119140625, 38.75408327579141],
|
2019-11-06 11:57:42 +08:00
|
|
|
zoom: 2,
|
|
|
|
});
|
|
|
|
|
2019-11-10 21:20:26 +08:00
|
|
|
const zoomControl = new Zoom();
|
2019-11-14 20:11:59 +08:00
|
|
|
const scaleControl = new Scale({
|
|
|
|
position:'rightbottom',
|
|
|
|
});
|
2019-11-10 21:20:26 +08:00
|
|
|
scene.addControl(zoomControl);
|
|
|
|
scene.addControl(scaleControl);
|
|
|
|
|
|
|
|
|