Rotating Icon

2,122 views
Skip to first unread message

Crotalus

unread,
Nov 7, 2006, 12:45:27 PM11/7/06
to KML Discussions
I have seen other kml files that have icons that point in different directions. For example there are several kmls that track air traffic and the icon for the plane points in the direction the plane is flying. Is there a way to rotate the icon or are they making several different custom icons with planes pointing in different directions?

Valery35

unread,
Nov 7, 2006, 3:57:30 PM11/7/06
to KML Discussions
1. You can make arrow, save this as png file with transparancy background and place this as ground overlays.
2. You can create 3D model in SketchUp. It's more hard way.

IMHO for pilots best way it is groundoverlays.

john3136

unread,
Nov 7, 2006, 9:08:07 PM11/7/06
to KML Discussions
You can set a Heading as part of the style
e.g.

<Placemark id="demo">
<name>A Placemark</name>
<description>Blah</description>
<styleUrl>root://styleMaps#default+nicon=0x307+hicon=0x317</styleUrl>
<Style>
<IconStyle>
<heading>300</heading>
<Icon><href>root://icons/palette-2.png</href><w>32</w><h>32</h></Icon>
</IconStyle>
</Style>
<Point>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates>-156.56667,20.56667,7924.8</coordinates></Point>
</Placemark>

simon_a

unread,
Nov 8, 2006, 6:00:54 AM11/8/06
to KML Discussions
Hello,

Here's a quick example of what Valery suggested - although nowhere near as nice as his image!

I've included ground overlay of an arrow along with a placemark with no icon so it can be labeled. The text will always be shown the right way round whereas the arrow will stay pointing into the port in La Rochelle, France when you rotate the view. Clearly the text will swing over the arrow at some stage so you'lll need to work on how everything is placed...



Cheers,

Simon.
676272-arrow.kmz

accordionman

unread,
Nov 13, 2006, 12:02:52 PM11/13/06
to KML Discussions
Quote:

You can set a Heading as part of the style




This was always a part of KML 2.0, but seems to now be undocumented in KML 2.1, though it appears to still work.

Why did Google remove the documentation for Icon heading? IconStyle

And when might it return?

Btw, the ground overlay solution mentioned elsewhere in this thread is great for icons placed on the ground that will always be the same size, but they don't scale at all as the user zooms out, like an icon otherwise would. And they can't be placed at elevation. The only solution for this situation is the IconStyle with heading tag.

Chris198

unread,
Nov 13, 2006, 1:20:49 PM11/13/06
to KML Discussions
On a similar note, i'm using the heading tag in iconstyle for a little plane icon so that when i play a video of a aircraft flying it looks half realistic cos the plane points where its supposed to. However, the plane icon always points towards the viewer, so if you ar viewing side on you still see the plane as a top down view. This isnt such a problem really but when the plane banks at this angle it makes it look a bit odd and as tho it isnt quite turning right. Is there some way to keep the icon flat, maybe using the tilt tag or something like that?

accordionman

unread,
Nov 13, 2006, 1:51:12 PM11/13/06
to KML Discussions
I haven't found any solution to that so far either. You could try using an airplane model (and using an icon instead when you're far away, via regions).
Reply all
Reply to author
Forward
0 new messages