Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Leaflet 传单工具提示中的图标_Leaflet - Fatal编程技术网

Leaflet 传单工具提示中的图标

Leaflet 传单工具提示中的图标,leaflet,Leaflet,试图在传单工具提示中添加图标,但未成功-有人举个例子吗? 例如,添加 layer.bindTooltip(msg+"<i class=\"fas fa-headphones\"></i>") layer.bindTooltip(msg+“”) 不起作用 谢谢添加到工具提示中的字符串可以是html字符串: layer.bindTooltip("<div><span style='display:bloc

试图在传单工具提示中添加图标,但未成功-有人举个例子吗? 例如,添加

layer.bindTooltip(msg+"<i class=\"fas fa-headphones\"></i>")
layer.bindTooltip(msg+“”)
不起作用
谢谢

添加到工具提示中的字符串可以是html字符串:

layer.bindTooltip("<div><span style='display:block'><strong>Custom Html with an Icon<strong></span><img src='https://pbs.twimg.com/profile_images/780792637481689088/8y-GChEY.jpg' width='30' /></div>");
layer.bindTooltip(“带有图标的自定义Html”;
但我认为你的问题是你的字体风格不好用。您是否已将库添加到项目中