如何向 KML 文件添加一个非常小的地标 - 创建热图
How to add a really tiny placemark to a KML file - to create heatmap
如何向 KML 文件添加非常小的地标? - 一个小点或类似的东西。
我有一组位置(纬度和经度),我可以将它们添加到 KML 文件中以创建 'heatmap'。我将每个位置添加为地标,当我向文件添加更多位置时,我可以构建一个显示位置和密度集群的热图。
问题是图标(例如默认的黄色图钉)太大了。有没有办法添加一个点或小标记?跨几个像素就可以了。
你在找这样的东西吗?:
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,40.42,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>
example showing on a Google Maps Javascript API v3 map with KmlLayer
如何向 KML 文件添加非常小的地标? - 一个小点或类似的东西。
我有一组位置(纬度和经度),我可以将它们添加到 KML 文件中以创建 'heatmap'。我将每个位置添加为地标,当我向文件添加更多位置时,我可以构建一个显示位置和密度集群的热图。
问题是图标(例如默认的黄色图钉)太大了。有没有办法添加一个点或小标记?跨几个像素就可以了。
你在找这样的东西吗?:
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,40.42,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>
example showing on a Google Maps Javascript API v3 map with KmlLayer