-
Notifications
You must be signed in to change notification settings - Fork 20
Measure toolbar
Filip Leitner edited this page Apr 30, 2024
·
3 revisions
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)
measureToolbar: true, //(true by default)
},
panelsEnabled: {
measure: true //(false by default)
}
});
}
}
Add HsMeasureModule import:
import {HsMeasureModule} from 'hslayers-ng/components/measure';
@NgModule({
imports: [HsMeasureModule],
})
export class YourAppModule {}
Add HsMeasureToolbarComponent component:
import {HsMeasureToolbarComponent} from 'hslayers-ng/components/measure';
import {HsLayoutService } from 'hslayers-ng/core';
@Component({
selector: 'your-app-component',
templateUrl: 'your-app-component.html',
})
export class YourAppComponent {
constructor(hsLayoutService: HsLayoutService) {
hsLayoutService.createOverlay(HsMeasureToolbarComponent, {});
}
}
Quick Links: Home ➖ App configuration ➖ Layer configuration ➖ Cesium configuration ➖ Composition schema (separate repo)