[android-developers] Re: KML and Google Map Application
I think I have figured this out. There are a couple problems with KML files and Android's map application... But nothing really huge. 1. Trying to dynamically generate the KML file doesn't seem to work... However, if one generates the KML and writes it to a file, the URI method can be used to load that KML file. No idea why, but it works perfectly well this way. 2. The format of the file absolutely has to have the style info in it (You can see a good example of it at the google examples of KML files. Just thought I'd let everyone know about that... On Dec 1, 7:43 am, furby wrote: > I'm not sure I follow that... > > On Dec 1, 12:42 am, Chander Pechetty wrote: > > > 1. Check the KML namespace..."http://www.opengis.net/kml/2.2"; > > 2. Is your URL - urlencoded ? You have to encode your url it has > > & ?... > > > On Nov 30, 11:43 pm, furby wrote: > > > > I have a KML file that is being generated on the server side and > > > loaded into the google maps application on Android. The resulting KML > > > file looks like this (Right now it has only one point in it): > > > > > > > http://earth.google.com/kml/2.x";> > > > Bridgewater Twp Martinsv > > > TEST > > > -74.03279876709,40.9547996521,0 > > Point> > > > > > > > > > > I am using these lines to start the app up and load the KML file : > > > final Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW, > > > Uri.parse("geo:0,0?q=[GENERATE THE KML FILE]")); > > > startActivity(myIntent); > > > > (Where the [GENERATE THE KML FILE] is the url to my application that > > > generates the file) > > > > For some reason it will not work... Can anyone see what I am doing > > > wrong in the KML file? I *think* it looks correct to me... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: KML and Google Map Application
I'm not sure I follow that... On Dec 1, 12:42 am, Chander Pechetty wrote: > 1. Check the KML namespace..."http://www.opengis.net/kml/2.2"; > 2. Is your URL - urlencoded ? You have to encode your url it has > & ?... > > On Nov 30, 11:43 pm, furby wrote: > > > I have a KML file that is being generated on the server side and > > loaded into the google maps application on Android. The resulting KML > > file looks like this (Right now it has only one point in it): > > > > > http://earth.google.com/kml/2.x";> > > Bridgewater Twp Martinsv > > TEST > > -74.03279876709,40.9547996521,0 > Point> > > > > > > > I am using these lines to start the app up and load the KML file : > > final Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW, > > Uri.parse("geo:0,0?q=[GENERATE THE KML FILE]")); > > startActivity(myIntent); > > > (Where the [GENERATE THE KML FILE] is the url to my application that > > generates the file) > > > For some reason it will not work... Can anyone see what I am doing > > wrong in the KML file? I *think* it looks correct to me... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: KML and Google Map Application
I know that if I send in other URI's from Google examples, it works like a charm... On Nov 30, 7:23 pm, jeffro wrote: > Is that URI format supported? This is what is listed in the developer > guide: > > geo:latitude,longitude > geo:latitude,longitude?z=zoom > geo:0,0?q=my+street+address > geo:0,0?q=business+near+city > > I don't see a url to KML file supported. > > http://developer.android.com/guide/appendix/g-app-intents.html > > Jeffhttp://www.trackaroo.com > > On Nov 30, 10:43 am, furby wrote: > > > I have a KML file that is being generated on the server side and > > loaded into the google maps application on Android. The resulting KML > > file looks like this (Right now it has only one point in it): > > > > > http://earth.google.com/kml/2.x";> > > Bridgewater Twp Martinsv > > TEST > > -74.03279876709,40.9547996521,0 > Point> > > > > > > > I am using these lines to start the app up and load the KML file : > > final Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW, > > Uri.parse("geo:0,0?q=[GENERATE THE KML FILE]")); > > startActivity(myIntent); > > > (Where the [GENERATE THE KML FILE] is the url to my application that > > generates the file) > > > For some reason it will not work... Can anyone see what I am doing > > wrong in the KML file? I *think* it looks correct to me... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: KML and Google Map Application
1. Check the KML namespace..."http://www.opengis.net/kml/2.2"; 2. Is your URL - urlencoded ? You have to encode your url it has & ?... On Nov 30, 11:43 pm, furby wrote: > I have a KML file that is being generated on the server side and > loaded into the google maps application on Android. The resulting KML > file looks like this (Right now it has only one point in it): > > > http://earth.google.com/kml/2.x";> > Bridgewater Twp Martinsv > TEST > -74.03279876709,40.9547996521,0 Point> > > > > I am using these lines to start the app up and load the KML file : > final Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW, > Uri.parse("geo:0,0?q=[GENERATE THE KML FILE]")); > startActivity(myIntent); > > (Where the [GENERATE THE KML FILE] is the url to my application that > generates the file) > > For some reason it will not work... Can anyone see what I am doing > wrong in the KML file? I *think* it looks correct to me... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: KML and Google Map Application
Is that URI format supported? This is what is listed in the developer guide: geo:latitude,longitude geo:latitude,longitude?z=zoom geo:0,0?q=my+street+address geo:0,0?q=business+near+city I don't see a url to KML file supported. http://developer.android.com/guide/appendix/g-app-intents.html Jeff http://www.trackaroo.com On Nov 30, 10:43 am, furby wrote: > I have a KML file that is being generated on the server side and > loaded into the google maps application on Android. The resulting KML > file looks like this (Right now it has only one point in it): > > > http://earth.google.com/kml/2.x";> > Bridgewater Twp Martinsv > TEST > -74.03279876709,40.9547996521,0 Point> > > > > I am using these lines to start the app up and load the KML file : > final Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW, > Uri.parse("geo:0,0?q=[GENERATE THE KML FILE]")); > startActivity(myIntent); > > (Where the [GENERATE THE KML FILE] is the url to my application that > generates the file) > > For some reason it will not work... Can anyone see what I am doing > wrong in the KML file? I *think* it looks correct to me... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en