Preventing / controlling scaling of placemark icons

1,424 views
Skip to first unread message

Kelvin Luck

unread,
Jan 9, 2012, 2:13:43 PM1/9/12
to google-earth-...@googlegroups.com
Hi,

I'm working on a project which has uses the Google Earth plugin / API and puts placemarks onto a globe. You can see it in action here:

http://weadapt.org/placemarks/earth

As you can see, the icon markers I am using are lightbulbs. However, I had the same issue with a standard Google marker image ( http://maps.google.com/mapfiles/kml/paddle/red-circle.png ). The problem is due to the dynamic scaling of the icons as you zoom in and out of the map. I can't find a value which looks good when you are zoomed out and when you are zoomed in. Additionally, the icons generally seem to be displayed smaller on PC than Mac. Is there any more precise way to set the desired size for icons? I searched and found some feature requests but no real solutions.

Is there anything I can do about this?

Thanks,

Kelvin

StarTraX

unread,
Jan 9, 2012, 4:45:21 PM1/9/12
to KML Developer Support - Google Earth Plug-in
Not really.
Once you are this far in to the game you should probably be looking
models because then you do have more control over their size.


On Jan 10, 6:13 am, Kelvin Luck wrote:
> Hi,
>
> I'm working on a project which has uses the Google Earth plugin / API and
> puts placemarks onto a globe. You can see it in action here:
>
> http://weadapt.org/placemarks/earth
>
> As you can see, the icon markers I am using are lightbulbs. However, I had
> the same issue with a standard Google marker image (http://maps.google.com/mapfiles/kml/paddle/red-circle.png). The problem is

Kelvin Luck

unread,
Jan 10, 2012, 6:07:14 AM1/10/12
to google-earth-...@googlegroups.com
:(

When you say models do you mean collada models as described here?
http://code.google.com/apis/earth/documentation/geometries.html#3dmodels

I considered ground overlays but I was concerned that they would be the same size irrespective of zoom (and so would be much too big when you were zoomed in). I guess the situation would be the same with models. Or are you suggesting listening for viewchange events and updating the model scale dynamically based on the altitude of the camera (or the range of the lookAt or something)?

Thanks,

Kelvin :)

StarTraX

unread,
Jan 10, 2012, 1:44:00 PM1/10/12
to KML Developer Support - Google Earth Plug-in
Yes, those are the ones.
And yes, scaling the model with
placemark.getGeometry().getScale().setScale(scale,scale,scale) using a
value for scale based on the camera's range could give you what you
want.

On Jan 10, 10:07 pm, Kelvin Luck wrote:
> :(
>
> When you say models do you mean collada models as described here?http://code.google.com/apis/earth/documentation/geometries.html#3dmodels
Reply all
Reply to author
Forward
0 new messages