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.

Save map panel

Config parameters

List of useful config parameters for the save map panel can be found here:

project_name

advancedForm

hostname

hostname.status_manager

hostname.status_manager.url

hostname.user.url

hostname.default

hostname.default.url

status_manager_url

Author information

Save map author information

Download composition

Download the map 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, {});
  }
}