OpenLayers not using theme CSS?

孤街醉人 提交于 2019-12-23 04:39:19

问题


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:


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.



来源:https://stackoverflow.com/questions/6989173/openlayers-not-using-theme-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!