- add LayerControl

- add layer prperty for map
- npm wanted updates
This commit is contained in:
Arno Kaimbacher 2020-12-04 17:12:22 +01:00
parent ea09f80f82
commit 572e6f41b5
8 changed files with 772 additions and 599 deletions

View file

@ -9,6 +9,7 @@ import { Map } from './core/Map';
import * as domEvent from './core/domEvent';
import { Coordinates } from './controls/Coordinates';
import { NortArrow } from './controls/NorthArrow';
import { LayerControl } from './controls/LayerControl';
import { Mesh } from 'three/src/objects/Mesh';
import { SphereGeometry } from 'three/src/geometries/SphereGeometry';
import { MeshLambertMaterial } from 'three/src/materials/MeshLambertMaterial';
@ -143,6 +144,11 @@ class Application {
});
this.map.addLayer(dxf140Layer);
new LayerControl(this.map.layers, {
collapsed: true
}).addTo(this.map);
domEvent.on(window, 'resize', this.onWindowResize, this);
domEvent.on(window, 'keydown', this.keydown, this);
this.start();