-
Notifications
You must be signed in to change notification settings - Fork 20
Map swipe panel
Filip Leitner edited this page Apr 30, 2024
·
5 revisions
Map swipe panel is used for managing map layers on each side of the swipe tool. User also can change the orientation of the swipe tool from vertical to horizontal.
List of useful config parameters for the compositions panel 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({
panelsEnabled: {
mapSwipe: true //(false by default)
}
});
}
}
Add HsMapSwipeModule import:
import {HsMapSwipeModule} from 'hslayers-ng/components/map-swipe';
@NgModule({
imports: [HsMapSwipeModule],
})
export class YourAppModule {}
Add HsMapSwipeComponent component:
import {HsMapSwipeModule} from 'hslayers-ng/components/map-swipe';
import {HsLayoutService } from 'hslayers-ng/core';
@Component({
selector: 'your-app-component',
templateUrl: 'your-app-component.html',
})
export class YourAppComponent {
constructor(hsLayoutService: HsLayoutService) {
hsLayoutService.createPanel(HsMapSwipeComponent, {});
}
}
Quick Links: Home ➖ App configuration ➖ Layer configuration ➖ Cesium configuration ➖ Composition schema (separate repo)