Display custom icons in KML by their actual size

Like the message below, I can’t get my label to display my icon by 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>

It seems that w and h do not affect the land of Google.

The icon is in a relative folder with a smaller size, but I want it to display the actual size.

Any information is appreciated.

+4
source share
3 answers

Google Earth ( Google) 32x32 , , , 50x50 64x64 32x32, scale = 1.0.

IconStyle KML , 1,0 32 , . ( 0,5 = 16 , 2.0 = 64 ..)

<Style>
  <IconStyle>
   <scale>1</scale>
   <Icon>
      <href>icon.png</href>
   </Icon>
  </IconStyle>
</Style>

(.. ), ( ) 32 , . , 64x80 32x40 .

, 32x32, 64x64.

KML.

+8

<w> <h> gx: <gx:w> <gx:h>

https://developers.google.com/kml/documentation/kmlreference#gxw

,

HTTP- , . , . x y , . , () () .

+2
 Use the Scale tag
 1 - Displays actual size
 anything less than 1 (0.1 - 0.9) - reduces the size of icon


<Style>
  <IconStyle>
   <scale>1</scale>
    <Icon>
      <href>Pins/aPin.jpg</href>
    </Icon>
  </IconStyle>
</Style>
0

Source: https://habr.com/ru/post/1532607/


All Articles