OpenLayers not using theme CSS?

2019-06-10 22:42发布

I need to customize the position (using CSS) of some of the elements, but when I change the style.css document in the theme/default directory inside OpenLayers, the CSS changes are not applied to the Map.

Additionally, the icons contained inside the theme/default/img directory for the map are not used. Instead the icons residing in the base /img directory are used.

Does anyone know how to tell OpenLayers to use the CSS and images from a specific theme?
How do I tell OpenLayers to use a theme?

1条回答
贪生不怕死
2楼-- · 2019-06-10 23:15

Make sure you reference style.css that resides in 'themes/default' directory correctly. Otherwise OpenLayers will rely on path to images defined inline, not in CSS classes, which is why your images are loaded from root directory and not 'themes/default/img', I guess.

查看更多
登录 后发表回答