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

@dlr-eoc/map-ol is missing styles for OpenLayers #158

Closed boeckMt closed 2 years ago

boeckMt commented 2 years ago

Describe the bug

The map-ol component is missing styles for OpenLayers. This is due to removing the ~ from the import https://github.com/dlr-eoc/ukis-frontend-libraries/pull/151/commits/e3e98c1a9a04a23c2109a509e902d14c1b6bdc9d which we assumed was no longer needed.

Building components with the angular cli and using @import '~...' in the components style, includes the whole style in the build... This is something we don't want either, therefore documentation is the best option for this.

It is also easy to fix:

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"
  ],
...

Expected behavior

This should be fixed or documentation should be provided how to work with the new behavior.

Versions

App