DDMS won't load (or doesn't parse?) KML file
Question
I can't get DDMS to load any KML files.
I have a KML file for example with the following in it:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Placemark>
<name>Simple placemark</name>
<description>Attached to the ground. Intelligently places itself
at the height of the underlying terrain.</description>
<Point>
<coordinates>-122.0822035425683,37.42228990140251,0</coordinates>
</Point>
</Placemark>
</kml>
The docs at http://developer.android.com/guide/developing/tools/ddms.html seem to indicate that I only need to launch my app and fire up DDMS and load the KML. That doesn't work.
I even tried the Google Earth solution suggested at the same link.
I'm using SDK 1.5_r2. I am doing something wrong or missing something?
Solution
There are some quirks:
You have to specify the namespace as:
<kml xmlns="http://earth.google.com/kml/2.x">
"Placemark" elements must start with capital letter.
"coordinates" and "name" elements must be within a "Placemark" element and start in lowercase.
Your example only needs a different namespace.
OTHER TIPS
For those coming here from Google, this is the only online KML conversion tool I've found that will turn a regular KML file into one that DDMS will parse:
I have found this Link that converts the KML files to ones compatible with android. http://ge2adt.appspot.com/
This example kml file worked for me. The trick was using notepad to create it, not wordpad. Your mileage may vary.