如何解决如何在KML文件中添加非常小的地标-创建热图
如何为KML文件添加很小的地标? -一个小点或类似的东西。
我有一组位置(纬度和经度),可以添加到KML文件中以创建“热图”。我将每个位置都添加为地标,因为我向文件中添加了更多和位置,所以我可以建立一个显示位置和密度簇的热图。
问题在于图标(例如默认的黄色图钉)根本太大了。有没有办法添加单个点或微小标记?跨过几个像素就可以了。
解决方法
您是否正在寻找类似的东西?:
KML:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Document>
<Style id="measle">
<IconStyle id="measle">
<!-- specific to IconStyle -->
<scale>1</scale>
<Icon>
<href>https://maps.gstatic.com/intl/en_us/mapfiles/markers2/measle.png</href>
</Icon>
<hotSpot x="0.5" y="0.5"
xunits="fraction" yunits="fraction"/>
</IconStyle>
</Style>
<Placemark id="pm123">
<styleUrl>#measle</styleUrl>
<name>point123</name>
<Point>
<coordinates>-95.44,40.42,0</coordinates>
</Point>
</Placemark>
<Placemark id="pm456">
<styleUrl>#measle</styleUrl>
<name>point456</name>
<Point>
<coordinates>-95.43,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>
example showing on a Google Maps Javascript API v3 map with KmlLayer
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。