我制作了以下应用程序:http://lae2.alwaysdata.net/carte/exppng/
I made the following app : http://lae2.alwaysdata.net/carte/exppng/
我想将我的两个控件(leaflet-control-zoom 和leaflet-control-layers)放在 div 地图之外.例如,我想在灰色区域内使用它们.
I'd like to put my two controls (leaflet-control-zoom and leaflet-control-layers) outside the div map. I'd want to use them inside the grey area for example.
我想知道这是否可能:我寻找了一些技巧,但我没有找到任何东西......
I'd like to know if it's possible : I looked for some tricks but I didn't find anything...
如果可以,你能帮帮我吗?
If it is could you help me ?
谢谢!
您可能会对以下帖子感兴趣:
You would probably be interested in the following posts:
本质上:
document.getElementById("myNewContainerId").appendChild(
L.control.layers(base, overlays).onAdd(map)
);
外部来源:
这篇关于Leaflet - 将控件放在 div 地图之外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
检查一个多边形点是否在传单中的另一个内部Check if a polygon point is inside another in leaflet(检查一个多边形点是否在传单中的另一个内部)
更改传单标记群集图标颜色,继承其余默认 CSSChanging leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改传单标记群集图标颜色,继承其余默认
触发点击传单标记Trigger click on leaflet marker(触发点击传单标记)
如何更改 LeafletJS 中的默认加载磁贴颜色?How can I change the default loading tile color in LeafletJS?(如何更改 LeafletJS 中的默认加载磁贴颜色?)
将外部geojson添加到传单层Add external geojson to leaflet layer(将外部geojson添加到传单层)
将 Leaflet 图层控件添加到侧边栏Adding Leaflet layer control to sidebar(将 Leaflet 图层控件添加到侧边栏)