Skip to content

Save map panel

Filip Leitner edited this page Apr 30, 2024 · 4 revisions

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:

project_name

advancedForm

hostname

hostname.status_manager

hostname.status_manager.url

hostname.user.url

hostname.default

hostname.default.url

status_manager_url

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, {});
  }
}
Clone this wiki locally