Save map panel - hslayers/hslayers-ng GitHub Wiki
Save the map
The Save Map panel is used to save map composition data to the Layman data server, grant access rights for other users, and specify author information. The user can also modify the composition extent values and choose which layers to include or exclude before saving. The result composition can also be downloaded as JSON file.
Config parameters
List of useful config parameters for the save map panel can be found here:
Author information
Download composition
Enable/disable
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: {
saveMap: true //(true by default)
}
});
}
}
If not using HslayersModule containing all components
Add HsSaveMapModule import:
import {HsSaveMapModule} from 'hslayers-ng/components/save-map';
@NgModule({
imports: [HsSaveMapModule],
})
export class YourAppModule {}
Add HsSaveMapComponent component:
import {HsSaveMapModule} from 'hslayers-ng/components/save-map';
import {HsLayoutService } from 'hslayers-ng/core';
@Component({
selector: 'your-app-component',
templateUrl: 'your-app-component.html',
})
export class YourAppComponent {
constructor(hsLayoutService: HsLayoutService) {
hsLayoutService.createPanel(HsSaveMapComponent, {});
}
}