-
Notifications
You must be signed in to change notification settings - Fork 20
Measure panel
Dailis edited this page Oct 12, 2021
·
5 revisions
import {HsConfig} from 'hslayers-ng';
@Component({
selector: 'your-app-component',
templateUrl: 'your-app-component.html',
})
export class YourAppComponent {
constructor(hsConfig: HsConfig) {
this.HsConfig.update({
panelsEnabled: {
measure: true //(false by default)
}
});
}
}
Add HsMeasureModule import:
import {HsMeasureModule} from 'hslayers-ng';
@NgModule({
imports: [HsMeasureModule],
})
export class YourAppModule {}
Add HsMeasureComponent component:
import {HsLayoutService, HsMeasureComponent} from 'hslayers-ng';
@Component({
selector: 'your-app-component',
templateUrl: 'your-app-component.html',
})
export class YourAppComponent {
constructor(hsLayoutService: HsLayoutService) {
hsLayoutService.createPanel(HsMeasureComponent, {});
}
}
Quick Links: Home ➖ App configuration ➖ Layer configuration ➖ Cesium configuration ➖ Composition schema (separate repo)