animated placemarks

404 views
Skip to first unread message

Jaws615

unread,
Nov 18, 2008, 12:41:13 AM11/18/08
to KML Developer Support - Google Earth Browser Plugin
I created an animated gif,for example one of the loading icons and set
it as an icon to a placemark but it doesn'tshow up. any ideas?

Roman N

unread,
Nov 19, 2008, 5:50:19 PM11/19/08
to KML Developer Support - Google Earth Browser Plugin
Hi Jaws615,

Unfortunately neither the Earth Browser Plugin nor Google Earth client
support animated GIFs. Is there a specific reason you need to use an
animated GIF? There may be another approach to your scenario.

- Roman

Jaws615

unread,
Nov 20, 2008, 8:39:31 AM11/20/08
to KML Developer Support - Google Earth Browser Plugin
As part of our application we want to show a different Icon for a
placemark it the placemark meets X criteria. One option was to make it
"blink" as it is possible with Google Maps. Since that API is not
quite compatible with the GE plugin. Changing the icon to one with an
animation was an option.
The other option is having a timer and changing the Placemark Icon on
it. The problem there is that we are looking at having several
Placemarks and different event triggers.
so I was looking at more "effective" option.

Roman N

unread,
Nov 20, 2008, 5:44:31 PM11/20/08
to KML Developer Support - Google Earth Browser Plugin
Hi Jaws615,

So you could still employ the timer technique, but instead of changing
the icon for each placemark, have each placemark use a shared style
and then just change the icon in that shared style at an interval.

Here's a quick run through of the steps involved:

1) Create a KmlDocument and add it to Earth: ge.getFeatures
().appendChild(doc);
2) Create a KmlStyle with an id (i.e. 'meetsCriteria'), and add it to
the KmlDocument using appendChild
3) Create KmlPlacemarks under the KmlDocument and use setStyleUrl() to
set each placemark's style URL to '#meetsCriteria'
4) On a timer, change the icon style parameters via your KmlStyle's
getIconStyle() method.

This gives you much more to work with than simple animted GIFs (i.e.
you can animate the icon scale, color, or the href itself).

Hope that helps!

- Roman
Reply all
Reply to author
Forward
0 new messages