dlr-eoc / ukis-frontend-libraries

A collection of angular ui-components, services, interfaces... to help you create geospatial mapping applications for the web.
Apache License 2.0
17 stars 4 forks source link

Time attribute missing in setMapState function #133

Closed lucas-angermann closed 2 years ago

lucas-angermann commented 2 years ago

In the function https://github.com/dlr-eoc/ukis-frontend-libraries/blob/1dcbf5ad2af15a642718ef560fd90f30c3211b91/projects/services-map-state/src/lib/map-state.service.ts#L21 the time attribute is left out. If the given MapState object contains a time value, it will not be passed to the map state service.

The time value should be added to the newState initialization: const newState = new MapState(state.zoom, state.center, state.options, state.extent, state.time);

Additionally, an own setTime() setter function similar to the setExtent function would be helpful, as the time is often adjusted independently of the other map states, e.g. with a time slider.