R中自定义真棒标记的传单传说?

时间:2017-08-30 19:07:16

标签: r geolocation leaflet visualization geospatial

我需要在传单地图中添加一些自定义标记图例。到目前为止,我找到的最接近的解决方案是this。根据链接中的解决方案,我需要使用addControl()函数。

首先,我必须以html格式链接自定义图像。见下文:

html_legend <- "<img src='http://leafletjs.com/docs/images/leaf-green.png'
style='width:10px;height:10px;'>green<br/> 

<img src='http://leafletjs.com/docs/images/leaf-red.png'  
style='width:10px;height:10px;'>red"

然后我使用html_legend作为addControl()函数的参数:

addMarkers(...)%>%
addControl(html = html_legend, position = "bottomleft")

使用Awesome Icons时如何获得相同的结果?

0 个答案:

没有答案