-
Notifications
You must be signed in to change notification settings - Fork 20
Measure panel
Filip Leitner edited this page Apr 30, 2024
·
5 revisions
The user can quickly get calculations for different zones or routes using the measurement panel. To start using this tool, the user must click on the measurement toolbar button. The user can mark routes or geometric shapes on the map and obtain the corresponding measurements in the measurement panel, in the form of a list.
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({
panelsEnabled: {
measure: true //(true by default)
}
});
}
}
Add HsMeasureModule import:
import {HsMeasureModule} from 'hslayers-ng/components/measure';
@NgModule({
imports: [HsMeasureModule],
})
export class YourAppModule {}
Add HsMeasureComponent component:
import {HsMeasureModule} 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.createPanel(HsMeasureComponent, {});
}
}
Quick Links: Home ➖ App configuration ➖ Layer configuration ➖ Cesium configuration ➖ Composition schema (separate repo)