OpenLayers不使用主题CSS? [英] OpenLayers not using theme CSS?

查看:94
本文介绍了OpenLayers不使用主题CSS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要自定义某些元素的位置(使用CSS),但是当我在OpenLayers中的theme / default目录中更改style.css文档时,CSS更改不会应用于Map。

此外,不使用地图的theme / default / img目录中包含的图标。而是使用驻留在base / img目录中的图标。

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.

有谁知道如何告诉OpenLayers使用CSS和特定主题的图像?
如何告诉OpenLayers使用主题?

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?

推荐答案

确保引用位于'主题中的style.css / default'目录正确。否则OpenLayers将依赖于内联定义的图像的路径,而不是CSS类中的图像,这就是为什么你的图像是从根目录加载而不是'themes / default / img'的原因,我想。

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.

这篇关于OpenLayers不使用主题CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆