# @dlr-eoc/map-ol

> This is a angular module that exports a OpenLayers component that can handle UKIS layers. See @dlr-eoc/services-layers for supported types.

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

## Install

```sh
npm install @dlr-eoc/map-ol
pnpm add @dlr-eoc/map-ol
yarn add @dlr-eoc/map-ol
bun add @dlr-eoc/map-ol
```

## 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 | 7 |
| Unpacked size | 374.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 17 |
| Author | Team UKIS |
| Maintainers | dlr-eoc-ukis |
| Keywords | angular, mapping, OpenLayers, layers |

## Links

- npm: https://www.npmjs.com/package/@dlr-eoc/map-ol
- 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/map-ol

## Dependencies (7)

- [ol](https://npm.io/package/ol.md) ^v10.9.0
- [proj4](https://npm.io/package/proj4.md) ^2.20.8
- [tslib](https://npm.io/package/tslib.md) ^2.6.3
- [ol-mapbox-style](https://npm.io/package/ol-mapbox-style.md) ^13.2.1
- [@dlr-eoc/utils-maps](https://npm.io/package/@dlr-eoc/utils-maps.md) 16.0.0
- [@dlr-eoc/services-layers](https://npm.io/package/@dlr-eoc/services-layers.md) 16.0.0
- [@dlr-eoc/services-map-state](https://npm.io/package/@dlr-eoc/services-map-state.md) 16.0.0

## 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/map-ol/versions

## README

# @dlr-eoc/map-ol

### how to use this in a ukis-angular project

For examples [see demo maps](../demo-maps/README.md)

#### add the following dependencies to the package.json
- "@dlr-eoc/map-ol"
- "@dlr-eoc/ngx-ukis-ui-clarity" (optional)
- "@dlr-eoc/base-layers-raster" (optional)


### add styles from OpenLayers to your application

e.g. in your apps style file
```
// styles.scss/styles.css
@import 'ol/ol.css';
...

```

or in the angular config file
```
// angular.json
...
  "styles": [
    ...
    "node_modules/ol/ol.css",
    "src/styles.scss"
  ],
...

```

#### add the following to a route-view.component.html
```
<section class="content-area map-view">
  <ukis-map-ol [layersSvc]="layerSvc" [mapState]="mapStateSvc" [controls]="controls"></ukis-map-ol>
</section>
```

#### add the following to a route-view.component.ts
```
import { MapOlComponent, MapOlService, IMapControls } from '@dlr-eoc/map-ol';
import { LayersService } from '@dlr-eoc/services-layers';
import { LayerControlComponent } from '@dlr-eoc/ngx-ukis-ui-clarity';
import { MapStateService } from '@dlr-eoc/services-map-state';

import { OsmTileLayer, EocLitemap, BlueMarbleTile } from '@dlr-eoc/base-layers-raster';
```


```
providers: [LayersService, MapStateService, MapOlService],
imports: [
    ...
    MapOlComponent,
    LayerControlComponent
]

...
controls: IMapControls;
  constructor(
    public layerSvc: LayersService,
    public mapStateSvc: MapStateService
) { }
```

```
// add a OnInit Function
export class <MyComponent> implements OnInit...
```

```
ngOnInit() {
    this.addBaselayers();
}

addBaselayers() {
    const layers = [
        new OsmTileLayer({
        visible: false
        }),
        new EocLitemap({
        visible: true
        }),
        new BlueMarbleTile({
        visible: false
        })
    ];

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


===

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

## Build

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

## Running unit tests

Run `ng test map-ol` 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/map-ol · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
