-
Notifications
You must be signed in to change notification settings - Fork 20
Draw toolbar
Filip Leitner edited this page Apr 30, 2024
·
6 revisions
List of useful config parameters for the draw toolbar can be found here:
import {HsConfig} from 'hslayers-ng/config';
@Component({
selector: 'your-app-component',
templateUrl: 'your-app-component.html',
})
export class YourAppComponent {
constructor(hsConfig: HsConfig) {
this.HsConfig.update({
componentsEnabled: {
toolbar: true, //(true by default)
guiOverlay: true, //(true by default)
drawToolbar: true, //(true by default)
}
});
}
}
Add HsDrawModule import:
import {HsDrawModule} from 'hslayers-ng/components/draw';
@NgModule({
imports: [HsDrawModule],
})
export class YourAppModule {}
Add HsDrawToolbarComponent component:
import {HsLayoutService } from 'hslayers-ng/core';
import {HsDrawToolbarComponent} from 'hslayers-ng/components/draw';
@Component({
selector: 'your-app-component',
templateUrl: 'your-app-component.html',
})
export class YourAppComponent {
constructor(hsLayoutService: HsLayoutService) {
hsLayoutService.createOverlay(HsDrawToolbarComponent, {});
}
}
Quick Links: Home ➖ App configuration ➖ Layer configuration ➖ Cesium configuration ➖ Composition schema (separate repo)