Send lon/lat & description from html table cell to google earth
I have a table in an html page where each cell开发者_StackOverflow中文版 contains one line whose elements are separated by spaces:
09/04/2011 16:06:23 Suspect Vessel, INDIAN OCEAN 14 16 N 056 32 E
Each row cell contains similar entries. What would be the best way to extract these elements and send them as a label to GoogleEarth (KMZ?) and have it run automatically every day so any new entries are added to the map?
Just extract the entries and put them into KML as placemarks
Here's the sample KML from Google:
<Placemark>
<name>Google Earth - New Placemark</name>
<description>Some Descriptive text.</description>
<LookAt>
<longitude>-90.86879847669974</longitude>
<latitude>48.25330383601299</latitude>
<range>440.8</range>
<tilt>8.3</tilt>
<heading>2.7</heading>
</LookAt>
<Point>
<coordinates>-90.86948943473118,48.25450093195546,0</coordinates>
</Point>
</Placemark>
http://code.google.com/apis/kml/documentation/kmlreference.html#placemark
You can add an icon to the placemark to make it look a little nicer:
http://code.google.com/apis/kml/documentation/kmlreference.html#icon
You really only need to use a KMZ if you want to include custom images/icons for the placemark.
精彩评论