如何在KML文件中添加非常小的地标-创建热图

问题描述

如何为KML文件添加很小的地标? -一个小点或类似的东西。

我有一组位置(纬度和经度),可以添加到KML文件中以创建“热图”。我将每个位置都添加为地标,因为我向文件添加了更多和位置,所以我可以建立一个显示位置和密度簇的热图。

问题在于图标(例如认的黄色图钉)根本太大了。有没有办法添加单个点或微小标记?跨过几个像素就可以了。

解决方法

您是否正在寻找类似的东西?:

measle.png

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>

screenshot of Google Map

example showing on a Google Maps Javascript API v3 map with KmlLayer

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...