Weird URL parse issue. (Android)
Posted
by Tarmon
on Stack Overflow
See other posts from Stack Overflow
or by Tarmon
Published on 2010-06-08T20:28:23Z
Indexed on
2010/06/08
20:32 UTC
Read the original article
Hit count: 414
I am attempting to parse in a URL to a KML file from maps.google.com. When I try and use this link:
I am unable to overlay this KML file on my MapView. If I were to take the KML file that I get from following this link and upload it to my Dropbox it will work just fine. I think there may be something about the URL from Google that it doesn't like?
Link from dropbox:
Also it would be better if we could just save these KML files locally and pass them in the same way but I can't figure out a way to do this.
Here is the code I am using:
Intent mapIntent = new Intent(Intent.ACTION_VIEW);
Uri uri1 = Uri.parse("geo:0,0?q=http://code.google.com/apis/kml/
documentation/KML_Samples.kml");
mapIntent.setData(uri1);
startActivity(Intent.createChooser(mapIntent, "Test"));
The URL used in this example also works.
So to recap:
- I am curious as to why some URLs work and others don't.
- Is there a way to place this KML file locally on the device and pass it to a Uri object?
- Any other suggestions?
Thanks, Rob
© Stack Overflow or respective owner