# @dlr-eoc/services-map-state

> This module is an interface to handle zoom, center, extent and time of maps. The idea is similar to @dlr-eoc/services-layers.

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

## Install

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

## 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 | 2 |
| Unpacked size | 41.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 17 |
| Author | Team UKIS |
| Maintainers | dlr-eoc-ukis |
| Keywords | angular, mapping, state, zoom, center, bbox, time |

## Links

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

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) ^2.6.3
- [@dlr-eoc/services-layers](https://npm.io/package/@dlr-eoc/services-layers.md) 16.0.0

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K 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-map-state/versions

## README

# @dlr-eoc/services-map-state

The `MapStateService` should be an interface to handle `zoom`, `center`, `extent`, `view angle`, `rotation` and `time` of maps.
The idea is similar to `@dlr-eoc/services-layers`.
### how to use this in a ukis-angular project

```
import { MapStateService } from '@dlr-eoc/services-map-state';
```

```
constructor(public mapStateSvc: MapStateService,...)
```

```
ngOnInit(){
  this.mapStateSvc.setExtent([-14, 33, 40, 57]);
}
```


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


This module is used by components like:
- @dlr-eoc/map-ol
- @dlr-eoc/map-cesium
- @dlr-eoc/map-maplibre
- @dlr-eoc/ngx-ukis-ui-clarity (layer-control, map-tools)
- ...

It implements a basic 'state' for the map like:
- zoom
- center
- options
- extent
- view angle (for 3D maps)
- rotation
- time

for more details [see map-state](../services-map-state/src/lib/types/map-state.ts)



===

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

## Build

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

## Running unit tests

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