Issue
Using the DDMS view in Eclipse, I see there is the possibility of using KML files to feed locations to the AVD. I have an app that listens for locations and moves a Google mapview around, drawing lines from one spot to another. When I manually feed it using the manual tab it works fine.
However when I try to open a valid KML file, nothing happens. I have hundreds of valid KML files that work just fine in Google Earth, Bing Maps, and Google Maps. But the DDMS emulator control does not open them. No error of any kind, it just doesn't open them. I pasted a small KML file below.
(There is a problem with this forum software. When I paste code and such it does not capture everything so it looks like an invalid file but it's not. It usually catches the first line, skips a bunch of other lines, and then shows the rest of the file. It does this with Java code too).
Thanks, Gary
<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Name>_Name</Name>
<Style id="mTTPathStyle">
<LineStyle>
<color>aaff0000</color>
<width>4</width>
</LineStyle>
</Style>
<Style id="StartIconStyle">
<IconStyle>
<Icon><href>http://dl.dropbox.com/u/39662979/start.png</href></Icon>
<hotSpot x="0.5" y="0.0" xunits="fraction" yunits="fraction" />
</IconStyle>
</Style>
<Style id="FinishIconStyle">
<IconStyle>
<Icon><href>http://dl.dropbox.com/u/39662979/finish.png</href></Icon>
<hotSpot x="0.5" y="0.0" xunits="fraction" yunits="fraction" />
</IconStyle>
</Style>
<Folder>
<name>Test1</name>
<open>1</open>
<Placemark><name><![CDATA[6/3/2012 4:00:34 PM]]></name><visibility>1</visibility><styleUrl>#StartIconStyle</styleUrl><Point><coordinates>-111.03501118, 31.79118389, 893.5 </coordinates></Point></Placemark>
<Placemark><name><![CDATA[6/3/2012 4:01:55 PM]]></name><visibility>1</visibility><description>Test1 0.37 Miles 1 min, 21 sec 16.7 MPH</description><styleUrl>#FinishIconStyle</styleUrl><Point><coordinates>-111.03053401,31.79307061,932.299987792969 </coordinates></Point></Placemark>
<Folder><name><![CDATA[Path]]></name><open>0</open><Placemark><name>only Segment for now</name><styleUrl>#mTTPathStyle</styleUrl><LineString><extrude>0</extrude><tessellate>1</tessellate><altitudeMode>clampToGround</altitudeMode><coordinates>-111.03501118,31.79118389,893.5 -111.0352843,31.79227626,917.299987792969 -111.03510817,31.79219134,927.099975585938 -111.03491294,31.79222276,927.5 -111.03483045,31.79230171,928 -111.03465771,31.79236738,929.799987792969 -111.03418779,31.79235829,933.799987792969 -111.03282738,31.79241828,934.799987792969 -111.03200371,31.79269077,932.099975585938 -111.03157208,31.79302646,933.900024414063 -111.0311052,31.79310853,933.599975585938 -111.03053401,31.79307061,932.299987792969 </coordinates></LineString></Placemark></Folder>
</Folder>
Solution
As it turns out what is valid KML for Google Earth, Google Maps, and Bing Maps is not valid KML for Eclipse. However there is a KML converter at http://ge2adt.appspot.com/ (need Google groupslogin creds). I converted several of my KML files and they work great now in Eclipse. Gary Blakely
Answered By - Dean Blakely
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.