Placemark icon scaling

316 views
Skip to first unread message

Jan Jedlicka

unread,
Jun 23, 2009, 8:54:13 AM6/23/09
to KML Developer Support - Google Earth Plug-in
I have some problems with icon size changing during animation
(javascript driven).
Firstly I implemented javascript driven animation for goole maps and
now i'm working on version for GE plugin. I'd like to use same basic
approach in both applications [ changing marker/placemark position in
predefined tim intervals using setInterval ].
Everything works fine in google maps, and basically it works also in
GE plugin.
But the problem is that when placemark position is changed in GE
plugin [using GE API], placemarker icon is scale ( from small to some
defined size). Because in animation placemar is changed really often,
icon changes it's size continuously. Becuase of this it's difficult to
follow animation.

Does anyone know if there is any possibility to switch off icon
resizing during placemarke position chnage?? Or any other idea how
overcome this problem??
You know that there is some possibility to use animation tags in kml
files but it's not well suited for in my case (animation is driven by
user, user can change speed of anim, switch on and off or go throught
animation using slider, so javascritp approach is quite good for
handle user interaction)

piece of code used fo placemark animation

var point = this.ge.createPoint('');
point.setLatitude(GLatLng.lat());
point.setLongitude(GLatLng.lng());
if(this.GEmarkers[arg]){
this.GEmarkers[arg].setGeometry(point);
//this.GEmarkers[arg].getStyleSelector().getIconStyle().setScale
(1)
}

Thanks for your ideas

DougH

unread,
Jun 23, 2009, 11:08:55 AM6/23/09
to KML Developer Support - Google Earth Plug-in
Jan -

I have similar problems with placemarks scaling up and down, and
posted a couple of messages about it, along with a feature request to
disable scaling:

http://groups.google.com/group/google-earth-browser-plugin/msg/432393ff6bfc3d36

http://groups.google.com/group/google-earth-browser-plugin/msg/6d3644deae101869

http://code.google.com/p/earth-api-samples/issues/detail?id=224

It sounds like your problem is more dramatic than mine, but I think we
need a way to disable this type of scaling, either with a style for
individual features or globally, rather than find a work around.
Others seem to agree, so be sure to vote for it by starring the
request, if you think it will help you with your problem.

Doug
Message has been deleted

StarTraX

unread,
Jun 24, 2009, 5:53:05 AM6/24/09
to KML Developer Support - Google Earth Plug-in
This isn't the only problem when trying to use placemarks to identify
target points in animation projects. There are others relating to
orientation - don't get me started.
The fundamental problem is that an icon is only defined in 2D and
we're trying to use it in 3D.

My solution was to bite the bullet and look at replacing the icon with
a model - Suddenly all the problems disappeared and a whole wonderful
new world opened up - making the whole animation so much richer and
engaging.
There's a bit of work to learn how to incorporate the models - but
there's plenty of help on the Earth sites and an amazing warehouse of
models to use. http://sketchup.google.com/3dwarehouse/
My message: Throw away the icons - use models.

On Jun 24, 1:08 am, DougH wrote:
> Jan -
>
> I have similar problems with placemarks scaling up and down, and
> posted a couple of messages about it, along with a feature request to
> disable scaling:
>
> http://groups.google.com/group/google-earth-browser-plugin/msg/432393...
>
> http://groups.google.com/group/google-earth-browser-plugin/msg/6d3644...

Barry Hunter

unread,
Jun 24, 2009, 7:51:31 AM6/24/09
to KML Developer Support - Google Earth Plug-in


On Jun 24, 10:53 am, StarTraX wrote:
> This isn't the only problem when trying to use placemarks to identify
> target points in animation projects. There are others relating to
> orientation - don't get me started.
> The fundamental problem is that an icon is only defined in 2D and
> we're trying to use it in 3D.
>
> My solution was to bite the bullet and look at replacing the icon with
> a model - Suddenly all the problems disappeared and a whole wonderful
> new world opened up - making the whole animation so much richer and
> engaging.

OH!! Nice idea. Will have to try that!

> There's a bit of work to learn how to incorporate the models - but
> there's plenty of help on the Earth sites and an amazing warehouse of
> models to use.http://sketchup.google.com/3dwarehouse/
Reply all
Reply to author
Forward
0 new messages