getting custom icons to appear larger

1,614 views
Skip to first unread message

Will Olsen

unread,
Feb 1, 2010, 3:27:23 PM2/1/10
to KML Developer Support - Getting Started with KML
Hello,

I am new to kml files. I am trying to make my custom icons appear
larger, but it seems that the <scale> tag has no effect. I defined my
icons in the header like this:

<Style id="RCSP">
<IconStyle id="mystyle1">
<Icon>
<href>icons/rcsp.png</href>
<scale>1.0</scale>
</Icon>
</IconStyle>
</Style>

Then I used the following in my placemarks: <styleUrl>#RCSP</styleUrl>

All of my different icons work fine, but changing the scale value has
no effect. I tried resizing the icons themselves but they appear the
same in Google Earth. I also tried changing file type, directory, and
local vs internet hosting.

Does Google Earth block larger Icons? If so, what function does
<scale> serve, and is there any way around this?

Otherwise, any suggestions on how to get the icons larger?

Any and all help is appreciated.

Thanks,

Will

Will Olsen

unread,
Feb 1, 2010, 3:30:49 PM2/1/10
to KML Developer Support - Getting Started with KML
Additionally, is there any way to get the icon to appear larger when
zoomed far out? Currently, when I zoom out the icons shrink to nearly
invisible sizes. Even if they were the small standard size, that would
be better than nothing.

Thanks in advance for any suggestions!

Nymor

unread,
Feb 2, 2010, 4:44:05 AM2/2/10
to KML Developer Support - Getting Started with KML
Hi,

I can't see anything obvious that might be wrong there from what you
posted - seems fine to me and should work.

I've uploaded a file, style_scale.kml, to the Files section (in the
right hand panel --> ) that has 2 styles defined - one with scale=1
and the other with scale=2. There are then 2 placemarks each one using
one of those styles. The second placemark's icon is, as expected,
twice the size of the first one.

(The uploaded file is a cut-down version of another recent one,
airports_styleoverrides.kml, that uses StyleMaps and overrides within
the placemarks to have different icon scales and while a bit more
complicated maybe of use somewhere along the line. Just mentioning
that one really).

I'm also not sure how your icons shrink when zooming out? - they don't
in the above example so maybe it's another symptom of your problem?
strange.

Not sure if that helps at all - but maybe just replacing the href in
the example file and seeing what you get might give some clues?

Regards
Nymor

Will Olsen

unread,
Feb 2, 2010, 11:41:48 AM2/2/10
to KML Developer Support - Getting Started with KML
After looking at your example I realized that I was putting the
<scale> tags inside <icon>. Once I moved them out it worked perfect.
Here's what it looks like now in case anyone else has the same
problem:

<Style id="RCSP">
<IconStyle>
<scale>3.0</scale>
<Icon>
<href>icons/rcsp.png</href>
</Icon>
</IconStyle>
</Style>

Thanks so much!

Nymor

unread,
Feb 2, 2010, 12:49:43 PM2/2/10
to KML Developer Support - Getting Started with KML
No problem - should have noticed that myself.

Glad you got it going.

Nymor
Reply all
Reply to author
Forward
0 new messages