-
Notifications
You must be signed in to change notification settings - Fork 20
Permalink panel
Filip Leitner edited this page Apr 30, 2024
·
4 revisions
The sharing panel allows the user to share the map as a simple image, obtained by copying the map view, or as an permalink, preserving the layers and structure of the map composition, allowing another user to further process the map. Sharing is also instantly available on a variety of social networks, such as Twitter, Skype, Facebook, and more.
List of useful config parameters for the permalink 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: {
permalink: true //(true by default)
}
});
}
}
Add HsShareModule import:
import {HsShareModule} from 'hslayers-ng/components/share';
@NgModule({
imports: [HsShareModule],
})
export class YourAppModule {}
Add HsShareComponent component:
import {HsShareModule} from 'hslayers-ng/components/share';
import {HsLayoutService } from 'hslayers-ng/core';
@Component({
selector: 'your-app-component',
templateUrl: 'your-app-component.html',
})
export class YourAppComponent {
constructor(hsLayoutService: HsLayoutService) {
hsLayoutService.createPanel(HsShareComponent, {});
}
}
Quick Links: Home ➖ App configuration ➖ Layer configuration ➖ Cesium configuration ➖ Composition schema (separate repo)