Open Google Maps directly from application

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Open Google Maps directly from application

Postby andreleitao » Mon Sep 28, 2009 2:04 pm

Hi, I'm trying to show a route from Google Maps triggered from my application. I wrote this code below:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. startActivity(new Intent(Intent.ACTION_VIEW, Uri
  3.                                         .parse("http://maps.google.com/maps?f=d&source=s_d&saddr=" +lat1+","+lng1+ "&daddr=" +lat2+","+lng2)));
  4.  
  5.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


When I execute this, device show me two options: open Google Maps from a browser or open Google Maps directly. I would like to open Google Maps directly, with no options menu before the action For example, when I call startActivity (code above) GMaps would be opened with no interference. Is it possible?

Thanks. :)
andreleitao
Experienced Developer
Experienced Developer
 
Posts: 70
Joined: Tue Mar 10, 2009 9:56 pm
Location: Recife - Brazil

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 3 guests