KmlLayer自定义图标
我有一个网站,我的社区的用户可以导入他的 KML 文件(从 Google 地图地球导出)并显示地图(例如他在芝加哥最喜欢的餐馆)。这部分很简单,但现在我要自定义地图上的图标,我不明白如何使用 KML 文件...
对此还有其他解决方案,也许导出/导入不同的文件而不是 kml? 谷歌地图是否允许以 json/xml 格式导出结果?
I have a website where a user of my community can import his KML file (exported from Earth of Google Maps) and display a map (ex his favorite restaurants in Chicago). this part was ok and easy but now I would customize the icons on the map, and i dont see how is it possible using KML files...
there is any othe solution to this, maybe exporting/importing a different file instead of kml?
does google maps allow to export the results in json/xml?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您只是尝试更改地标标记图标,则只需将地标的样式设置为包含图标节点的样式即可。
这将显示该标记路径中包含的图标而不是默认图标。
If you're trying to just change the placemark marker icons, you can just set the style of the placemark to a style that contains the icon node.
This will show the icon contained at that path for the marker instead of the default.