-
Notifications
You must be signed in to change notification settings - Fork 20
Query panel
Filip Leitner edited this page Apr 30, 2024
·
5 revisions
The Query info panel is designed to view and edit (if possible) detailed information about all highlighted features. The user can add new attribute fields, zoom in on the feature in the map view, copy the feature or move it to another layer, download the feature as a WKT or GeoJSON file and delete it. The panel also provides the ability to see the coordinates of the selected feature, as well as the option to switch the coordinate system from EPSG: 4326 to EPSG:3857.
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: {
info: true //(true by default)
}
});
}
}
Add HsQueryModule import:
import {HsQueryModule} from 'hslayers-ng/components/query';
@NgModule({
imports: [HsQueryModule],
})
export class YourAppModule {}
Add HsQueryComponent component:
import {HsQueryModule} from 'hslayers-ng/components/query';
import {HsLayoutService } from 'hslayers-ng/core';
@Component({
selector: 'your-app-component',
templateUrl: 'your-app-component.html',
})
export class YourAppComponent {
constructor(hsLayoutService: HsLayoutService) {
hsLayoutService.createPanel(HsQueryComponent, {});
}
}
Quick Links: Home ➖ App configuration ➖ Layer configuration ➖ Cesium configuration ➖ Composition schema (separate repo)