gpt4 book ai didi

google-maps - Polymer - 使用 Iron-icons 作为 google-map-marker 图标

转载 作者:行者123 更新时间:2023-12-05 01:24:14 24 4
gpt4 key购买 nike

我正在寻找一种方法来设置 google-map-marker 的图标,理想情况下我可以使用铁图标,因为它们已经在我的项目中的其他地方使用了。我找不到正确设置图标标记的方法。

离开铁图标元素的文档,我试过:

<link rel="import" href="../bower_components/iron-icons/iron-icons.html">

<google-map-marker latitude="37.7749295" longitude="-122.41941550000001" icon="favorite">
</google-map-marker>

自定义图标通过设置:icon="someImg.png"起作用,但我真的很想为此使用铁图标。
页面上的其他图标在铁图标标签内工作:
<iron-icon icon="favorite"></iron-icon>

我做错了什么还是有解决方法?

谢谢

最佳答案

来自 polymer 开发人员:

Right now, it's icon attribute is a simple URL to an image. The map marker element would need to be taught how to use the svg images within the iron icon set. The maps API takes a URL to an image as well: https://github.com/GoogleWebComponents/google-map/blob/master/google-map-marker.html#L236



现在一个功能请求:
https://github.com/GoogleWebComponents/google-map/issues/178

关于google-maps - Polymer - 使用 Iron-icons 作为 google-map-marker 图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31570753/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com