最近看了下网上一些对于openlayer的封装,抽取了两个比较好的案例封装了下,封装了图例和图层管理器
图层选择器代码封装
.hxMap-layer-switcher.shown.ol-control {
background-color: transparent;
}
.hxMap-layer-switcher.shown.ol-control:hover {
background-color: transparent;
}
.hxMap-layer-switcher {
position: absolute;