可以删除带图像的传单链接

时间:2015-10-12 08:42:44

标签: leaflet angular-leaflet-directive

我使用leaflet-directive使用传单创建地图。

是否可以从地图中删除传单链接和OSM版权。

我希望改为传单。

2 个答案:

答案 0 :(得分:5)

归因控制实例的引用存储在attributionControl实例的L.Map属性中:

var map = new L.Map('map').setView([0, 0], 0);

attribution = map.attributionControl;

当你得到它时,你可以使用setPrefix方法设置一个新的前缀:

attribution.setPrefix('<img src="image.png">');

http://leafletjs.com/reference.html#control-attribution-setprefix

答案 1 :(得分:0)

删除版权信息可能不合法,但如果您在传单代码中熟悉javascript搜索

'leaflet-control-attribution'

问候