2020-01-14 16:12:48 +08:00
|
|
|
// @ts-ignore
|
2020-02-08 01:51:17 +08:00
|
|
|
import { Mapbox } from '@antv/l7-maps';
|
|
|
|
import { Scene } from '../src/';
|
2020-01-14 16:12:48 +08:00
|
|
|
describe('template', () => {
|
|
|
|
const el = document.createElement('div');
|
|
|
|
el.id = 'test-div-id';
|
2020-02-08 01:51:17 +08:00
|
|
|
el.style.width = '500px';
|
|
|
|
el.style.height = '500px';
|
2020-01-14 17:01:29 +08:00
|
|
|
document.querySelector('body')?.appendChild(el);
|
2020-02-08 01:51:17 +08:00
|
|
|
const scene = new Scene({
|
|
|
|
id: 'test-div-id',
|
|
|
|
map: new Mapbox({
|
|
|
|
style: 'dark',
|
|
|
|
center: [110.19382669582967, 30.258134],
|
|
|
|
pitch: 0,
|
|
|
|
zoom: 3,
|
|
|
|
}),
|
|
|
|
});
|
2020-01-14 16:12:48 +08:00
|
|
|
|
2020-02-08 01:51:17 +08:00
|
|
|
it('scene map method', () => {
|
|
|
|
expect(scene.getZoom()).toEqual(3);
|
|
|
|
expect(scene.getPitch()).toEqual(0);
|
2020-01-14 16:12:48 +08:00
|
|
|
});
|
|
|
|
});
|