Google Earth Icons with Heading
I’ve discovered that icons given headings in Google Earth KML stopped orienting in the specified heading direction. The result is that when a user rotates the Earth so that true North is not directly “up” on the screen, the angle of the icon is misleading. For wind barbs, this could lead to dangerous decisions being made if the viewport isn’t manually corrected to set up = true north.
There are several known branches of this problem.
One involves the Google Earth browser plug-in:
Apparently, this incorrect handling is the end result of a bug fix to “correct” icon heading behavior.
Google Earth Plug-in – 5.1.3506.3999
(Issue 131) Icon headings should now behave as expected, and consistent with the Google Earth desktop client.
http://www.noeman.org/gsm/mac-other-oses-softwares/106515-google-earth-google-earth-plug.html
More on this bug (affecting version 5.1.x): http://www.google.com/support/forum/p/earth/thread?tid=005bea9c26949e40&hl=en
Work-arounds: GroundOverlay and use a Colada model, both ugly.
Another instance of the icon heading bug:
There is another situation in which the heading of the icon is not obeyed. This occurs when an invalid styleUrl is used in the KML. One recommendation is to remove the “#” character. ex: <styleUrl>#balloonStyle</styleUrl> is no longer correct as of version 5x. I have not confirmed this, but I’ve heard that this is correctly implemented as <styleUrl>balloonStyle</styleUrl>. What happend? This isn’t very backwards-compatible nor user-friendly. Why the change? HTML hashes are logically sound, as they refer to a locally named entity, such as those specified by a style id.
What worked for me was to completely remove the styleUrl when providing a local Style. See below.
Broken:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> <Document> <name>Weather Stations</name> <description><![CDATA[<p>Generated: 2010-01-19 22:03:45 UTC</p> <p>Only stations reporting <b>within 3 hours</b> are included in this document.</p>]]></description> <open>1</open> <Style> <ListStyle> <listItemType>radioFolder</listItemType> <bgColor>00ffffff</bgColor> <maxSnippetLines>2</maxSnippetLines> </ListStyle> </Style> <Style id="balloonStyle"> <BalloonStyle> <text><![CDATA[ <h2 style="font-size:1.1em;border-bottom:solid #333 1px;">Instrument: $[name]</h2> $[description] ]]></text> </BalloonStyle> </Style> <Folder> <name>Visibility and Avg Winds</name> <Style> <ListStyle> <listItemType>checkHideChildren</listItemType> <bgColor>00ffffff</bgColor> <maxSnippetLines>2</maxSnippetLines> </ListStyle> </Style> <visibility>0</visibility> <Placemark> <name>Any Instrument ID</name> <description><![CDATA[ <p><font color="#999">Sample Date</font></p> <div>Data Table Here</div>]]></description> <styleUrl>#balloonStyle</styleUrl> <Style> <IconStyle> <scale>3.25</scale> <heading>0</heading> <Icon> <href>http://www.example.com/barb.php?spd=4&dir=74&val=7&col=65280&dia=100</href> </Icon> </IconStyle> </Style> <Point> <coordinates>-117.1135,32.3325,0</coordinates> </Point> </Placemark> </Folder> </Document> </kml> |
Working:
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | <Placemark> <name>Any Instrument ID</name> <description><![CDATA[ <p><font color="#999">Sample Date</font></p> <div>Data Table Here</div>]]></description> <Style> <IconStyle> <scale>3.25</scale> <heading>0</heading> <Icon> <href>http://www.example.com/barb.php?spd=4&dir=74&val=7&col=65280&dia=100</href> </Icon> </IconStyle> </Style> <Point> <coordinates>-117.1135,32.3325,0</coordinates> </Point> </Placemark> |
-
Related Posts
tail -7 brain.log
Commonly Keyed
aspire awk bash beethovan bug cli command line compile configure creativity cron desire directory dns function git goals hwclock install java language learning linux log math mercator mysql Napoleon Hill network path php proj4 python Quotes redirect sbin stocks success sysadmin sysconfig Think and Grow Rich timezone ubuntu wkt writinghistory
- August 2010 (4)
- July 2010 (2)
- June 2010 (8)
- May 2010 (2)
- April 2010 (4)
- March 2010 (4)
- February 2010 (4)
- January 2010 (4)
- December 2009 (9)
- November 2009 (21)
- October 2009 (3)
- September 2009 (1)
- July 2009 (1)
- June 2009 (1)
- December 2008 (1)
- October 2008 (1)
Filed Under
- Gotchas (4)
- Lessons (8)
- Quotes (11)
- Reference (25)
- Scripts, Tricks and Hacks (12)
- Socratic deductions (1)
- Synopses (6)
- System Administration (11)
- Thought Fragments (6)