Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@dlr-eoc/layer-control

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dlr-eoc/layer-control

This is a angular module that exports some UI components to manage layers in mapping applications.


Version published
Weekly downloads
30
decreased by-59.46%
Maintainers
1
Weekly downloads
 
Created
Source

@dlr-eoc/layer-control

how to use this in a ukis-angular (@dlr-eoc/core-ui) project

For examples see demo maps

add the following dependencies to the package.json
  • "@dlr-eoc/map-ol"
  • "@dlr-eoc/layer-control"
add the following to the app.module.ts
import { MapOlModule } from '@dlr-eoc/map-ol';
import { LayerControlModule } from '@dlr-eoc/layer-control';

...

 imports: [
    ...
    MapOlModule,
    LayerControlModule
  ]
add the following to a route-view.component.html
<main class="content-area">
  <ukis-map-ol [layersSvc]="layersSvc" [mapState]="mapStateSvc" [controls]="controls" id="olMap"></ukis-map-ol>
</main>


<clr-vertical-nav [clrVerticalNavCollapsible]="true" [clr-nav-level]="2">

  <clr-vertical-nav-group [clrVerticalNavGroupExpanded]="true" class="layers">
    <clr-icon shape="world" title="Overlays" clrVerticalNavIcon></clr-icon>
    Overlays
    <clr-vertical-nav-group-children class="padding title-ellipsis">
      <ukis-layer-control [layersSvc]="layersSvc" [mapStateSvc]="mapStateSvc" [layerfilter]="'Overlays'">
      </ukis-layer-control>
    </clr-vertical-nav-group-children>
  </clr-vertical-nav-group>

  <clr-vertical-nav-group [clrVerticalNavGroupExpanded]="true" class="layers">
    <clr-icon shape="layers" clrVerticalNavIcon title="layers"></clr-icon>
    Layers
    <clr-vertical-nav-group-children class="padding title-ellipsis">
      <ukis-layer-control [layersSvc]="layersSvc" [mapStateSvc]="mapStateSvc"></ukis-layer-control>
    </clr-vertical-nav-group-children>
  </clr-vertical-nav-group>

  <clr-vertical-nav-group [clrVerticalNavGroupExpanded]="true" class="layers">
    <clr-icon shape="world" title="Baselayers" clrVerticalNavIcon></clr-icon>
    Baselayers
    <clr-vertical-nav-group-children class="padding title-ellipsis">
      <ukis-base-layer-control [layersSvc]="layersSvc" [mapStateSvc]="mapStateSvc"></ukis-base-layer-control>
    </clr-vertical-nav-group-children>
  </clr-vertical-nav-group>

</clr-vertical-nav>
add the following to a route-view.component.ts
import { LayersService, Layer } from '@dlr-eoc/services-layers';
import { MapStateService } from '@dlr-eoc/services-map-state';
import { IMapControls } from '@dlr-eoc/map-ol';

import { OsmTileLayer } from '@dlr-eoc/base-layers-raster';
controls: IMapControls;
  constructor(
    public layerSvc: LayersService,
    public mapStateSvc: MapStateService
) { }
ngOnInit() {
    this.addBaselayers();
    this.addLayers();
    this.addOverlays()
}

addBaselayers() {
    const layers: Layer[] = [
        ...
    ];

    layers.map(l => this.layerSvc.addLayer(l, 'Baselayers'));
}

addLayers() {
    const layers: Layer[] = [
        ...
    ];

    layers.map(l => this.layerSvc.addLayer(l, 'Layers'));
}

addOverlays(){
    const layers: Layer[] = [
        ...
    ];

    layers.map(l => this.layerSvc.addLayer(l, 'Overlays'));
}

===

This library was generated with Angular CLI version 8.2.14.

Code scaffolding

Run ng generate component component-name --project layer-control to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project layer-control.

Note: Don't forget to add --project layer-control or else it will be added to the default project in your angular.json file.

Build

Run ng build layer-control to build the project. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run ng test layer-control to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

Keywords

FAQs

Package last updated on 11 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc