Weird URL parse issue. (Android)
- by Tarmon
I am attempting to parse in a URL to a KML file from maps.google.com. When I try and use this link:
http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=112748174025829638330.000483ad6315714cc941d&z=13&output=kml`
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:
http://dl.dropbox.com/u/1037184/Blue_original.kml
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