DDMS not loading (or parsing?) KML file

I cannot get DDMS to load KML files.

I have a KML file, for example, with the following:

<?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 run the application and run DDMS and download KML. This does not work.

I even tried the Google Earth solution offered at the same link.

I am using SDK 1.5_r2. Am I doing something wrong or is something missing?

+4
source share
4 answers

There are several quirks:

  • You must specify the namespace as:

    <kml xmlns="http://earth.google.com/kml/2.x">

  • Label elements must begin with a capital letter.

  • β€œcoordinates” and β€œname” must be in the β€œlabel” element and begin with lower case.

In your example, only a different namespace is required.

+5
source

For anyone coming here from Google, this is the only online KML conversion tool I have found that will turn a regular KML file into one that will process DDMS:

http://lab.soledadpenades.com/android/kml/

+9
source

I found this link that converts KML files to Android compatible files. http://ge2adt.appspot.com/

+1
source

This example kml file worked for me. The trick used notepad to create it, not a text block. Your mileage may vary.

link text

0
source

All Articles