# @dlr-eoc/services-layers

> This module is an interface to use our defined layer types in different mapping libraries. E.g. OpenLayers, Cesium, Leaflet, MapLibre. The conversion of the generalized layers to the map specific should be implemented in the corresponding component like i

Latest version **16.0.0** (published 2026-05-29) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @dlr-eoc/services-layers
pnpm add @dlr-eoc/services-layers
yarn add @dlr-eoc/services-layers
bun add @dlr-eoc/services-layers
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 16.0.0 |
| Published | 2026-05-29 |
| First published | 2020-08-28 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 128 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 17 |
| Author | Team UKIS |
| Maintainers | dlr-eoc-ukis |
| Keywords | angular, mapping, layers, types, interface |

## Links

- npm: https://www.npmjs.com/package/@dlr-eoc/services-layers
- Repository: https://github.com/dlr-eoc/ukis-frontend-libraries
- Homepage: https://github.com/dlr-eoc/ukis-frontend-libraries#readme
- Issues: https://github.com/dlr-eoc/ukis-frontend-libraries/issues
- npm.io page: https://npm.io/package/@dlr-eoc/services-layers

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.6.3

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 16.0.0 (latest) — 2026-05-29
- 16.0.1-next.3 (next) — 2026-07-01
- 16.0.1-next.2 — 2026-06-15
- 16.0.1-next.1 — 2026-06-09
- 16.0.1-next.0 — 2026-06-05
- 16.0.0-next.9 — 2026-05-05
- 16.0.0-next.8 — 2026-03-16
- 16.0.0-next.7 — 2026-03-10
- 16.0.0-next.6 — 2026-03-06
- 16.0.0-next.5 — 2026-02-27
- 16.0.0-next.4 — 2026-02-26
- 16.0.0-next.3 — 2025-09-09
- 16.0.0-next.2 — 2025-08-01
- 16.0.0-next.0 — 2025-06-17
- 15.0.0 — 2024-12-30
- … 43 more at https://npm.io/package/@dlr-eoc/services-layers/versions

## README

# @dlr-eoc/services-layers


## The idea of the LayersService

It should be an interface to use our components with different mapping libraries e.g. OpenLayers, Cesium, Leaflet, MapLibre
For example one layer control which is working with all the different maps and layertypes. 
The conversion from our generalized layers to the map specific should be implemented in the corresponding component like in @dlr-eoc/map-ol 


![The idea of the layerService](assets/TheIdeaOfTheUkisLayerService.svg)
### how to use this in a ukis-angular project
```
import { LayersService } from '@dlr-eoc/services-layers';
```

```
constructor(public layersSvc: LayersService,...)
```

```
ngOnInit(){
  this.layersSvc.addLayer(layer, 'Baselayers');
}
```

It implements the base of handling ukis-layers and defines classes and types for Layers, LayerGroups, RasterLayers... 
There are actually three slots ('Baselayers' | 'Overlays' | 'Layers') to push layers so we can create a flat layer tree from that to give it to the corresponding map component. So if the mapping library does not handle groups it should also work.


The main functions you will work with are:
- addLayer
- updateLayer
- removeLayer

- addLayerGroup
- updateLayerGroup
- removeLayerGroup

- removeLayerOrGroupById
- getLayerOrGroupById


For examples see:
- [demo maps](../demo-maps/README.md)
- [layer-control](../layer-control/src/lib/base-layer-control/base-layer-control.component.ts)


This module is used by components like:
- @dlr-eoc/ngx-ukis-ui-clarity (layer-control)
- @dlr-eoc/base-layers-raster
- ...



===

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.14.

## Code scaffolding

Run `ng generate component component-name --project services-layers` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project services-layers`.
> Note: Don't forget to add `--project services-layers` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build services-layers` to build the project. The build artifacts will be stored in the `dist/` directory.

## Running unit tests

Run `ng test services-layers` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

---
_Source: https://npm.io/package/@dlr-eoc/services-layers · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
