Showing custom icons in KML at their actual sizes

The*_*ies 5 icons kml google-earth

Like the post below I cannot get my placemark to display my icon at their actual size.

https://stackoverflow.com/questions/21549842/how-to-display-custom-icon-of-placemark-in-original-size-width-height-at-kml

   <Style>
      <IconStyle>
        <Icon>
          <href>Pins/aPin.jpg</href>
          <w>95</w>
          <h>95</h>
        </Icon>
      </IconStyle>
    </Style>
Run Code Online (Sandbox Code Playgroud)

Seems w and h have no affect in google earth.

The icon is in a relative folder shows at some smaller size but I want it to display the actual size.

Any information is appreciated.

Jas*_*nM1 8

Google地球(以及谷歌地图)在地图上显示时将所有方形图标规范化为32x32像素,例如,当scale = 1.0时,50x50和64x64像素图标均标准化为32x32.

这可以使用KML中的IconStyle进行调整并调整比例,但1.0比例表示32像素,与实际图像大小无关.(比例0.5 = 16像素,比例2.0 = 64像素等)

<Style>
  <IconStyle>
   <scale>1</scale>
   <Icon>
      <href>icon.png</href>
   </Icon>
  </IconStyle>
</Style>
Run Code Online (Sandbox Code Playgroud)

如果图标图像是非正方形(即矩形),则较小的尺寸(高度或宽度)被标准化为32像素,并且较大的尺寸被标准化为具有相同的纵横比.例如,显示时,64x80图标图像将标准化为32x40像素.

因此,建议图标为32x32或64x64.

您可以使用此KML屏幕标尺测量"屏幕"像素尺寸.