Icon Offset

420 views
Skip to first unread message

Lobo93065

unread,
Jun 25, 2008, 1:38:47 AM6/25/08
to KML Developer Support - Getting Started with KML
I notice that there are two sets of coordinates when I use a placemark
(generated by the Add Placemark menu item). One is within a <lookat>
section with <latitude> and <longitude> sections. The other is within
a <point> section inside a <coordinates> section.

What I don't understand is why these coordinates are sometimes
different. I assume it may be to offset the icon.

When I create my own icon, what part of the icon gets placed at the
coordinate? Is it the center of the icon of the middle of the bottom
edge, or something else? Also, which of these coordinates is the icon
placed relative to?

Thanks,
Jim

barryhunter [KML Guru]

unread,
Jun 25, 2008, 9:25:53 AM6/25/08
to KML Developer Support - Getting Started with KML
The icon is always placed according to the <Point> coordinates.

The <Lookat> (or <Camera>) simply defines a view attached to the
placemark, it neednt even be near the placemark - the user will simply
see that view when double clicking the placemark - it can be used to
say put the icon in the distance or pick a particular viewing
direction or range. Its even optional.

If you didnt specifically click the 'snapshot view' to define the
Lookat then its possible its intended to be the placemark, but the
slight difference could well be down to the terrain, ie GE decided it
could shift the real center of the view slighty to show the placemakr.
(Or the Lookat defines where you where looking when creating it, but
then dragged the actual icon to a slightly different position)


For actully offsetting the icon according to the point coordinates,
see the HotSpot in the IconStyle
http://code.google.com/apis/kml/documentation/kmlreference.html#iconstyle
by default it puts the hotspot exactly in the center of the icon I
beleive.
.
Reply all
Reply to author
Forward
0 new messages