-1

I am developing an app with which, the user can input the destination and a route from his current position to the destination will be shown on the google map. I searched online and found many tutorials in which they were using google map api javascript v3 . I also read the official documents from

https://developers.google.com/maps/articles/android_v3, https://developers.google.com/maps/documentation/directions/

But I am confused as

  • how are they using the javascript in their program.
  • how is XML /JSON working.
  • how is this program overall is working?

As what I understand that the methods defined in the above documents are related to a browser app, so how will it be launched from an android application?

And finally which is the best way/method/api to develop this app.

Lastly , I am not looking for the code ,as I will develop the code myself. I am just wanted to know that overall how these app/ google maps is working?

Thanks

Marcelo
  • 9,387
  • 3
  • 35
  • 40

1 Answers1

1

This link have tutorial to draw route path on map in our app. this may help you and use below to link with map app... this will take to you in google map application

String uri = "http://maps.google.com/maps?f=d&hl=en&saddr="+source_latitude+","+source_longitude+"&daddr="+destination_latitude+","+destination_longitude;
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
startActivity(intent);
Dipak Keshariya
  • 22,193
  • 18
  • 76
  • 128
Sanket Kachhela
  • 10,861
  • 8
  • 50
  • 75
  • does the source_latitude/longitude and the destination_latitude/longitude needs to be constant or the user can enter these values in a text box and I can replace the source_latitude/longitude and the destination_latitude/longitude with the user's value? – user1833186 Nov 26 '12 at 05:47
  • for these 4 variable you have to pass value for it. – Sanket Kachhela Nov 26 '12 at 05:49
  • will it work, if the user enters name of the cities instead of the coordinates? – user1833186 Nov 29 '12 at 02:56