Going to Google maps with a address

Tutorials that use the MapActivity. Many using GPS functionality.

Going to Google maps with a address

Postby chris123price » Sun Aug 23, 2009 1:04 pm

Hello,

I have a list of address e.g

23 ABC road, city, post code, UK

When the user selects one of these address I want to go to google maps to that location.

Can someone please provide a code example?

Thanks !!!!!!
chris123price
Junior Developer
Junior Developer
 
Posts: 18
Joined: Thu Jun 25, 2009 8:54 am

Top

i want the same thing too

Postby mr_muskuraha » Wed Jan 20, 2010 8:06 am

can any one guide how to achieve this??
mr_muskuraha
Senior Developer
Senior Developer
 
Posts: 142
Joined: Wed Jan 13, 2010 8:49 am

Re: Going to Google maps with a address

Postby RDD » Sun May 09, 2010 2:53 pm

chris123price wrote:Hello,

I have a list of address e.g

23 ABC road, city, post code, UK

When the user selects one of these address I want to go to google maps to that location.

Can someone please provide a code example?

Thanks !!!!!!


I want to do the same, only it doesn't have to be google maps just the default navigation software the user has installed.
RDD
Once Poster
Once Poster
 
Posts: 1
Joined: Sun May 09, 2010 2:51 pm

Re: Going to Google maps with a address

Postby icobasco » Fri Jul 09, 2010 12:45 pm

Hi guys,
you can do that (if I got you) launching an intent to Maps.
Refering to the dev guide, here you are a snapshot.

Code: Select all

       /*
       * From the dev guide:
       * URI
          geo:latitude,longitude
         geo:latitude,longitude?z=zoom
         geo:0,0?q=my+street+address
         geo:0,0?q=business+near+city
       */
      
      Intent shareIntent = new Intent(Intent.ACTION_VIEW);
      String uri = "geo:" + latitude + ","+ longitude;
      shareIntent.setData(Uri.parse(uri));
      startActivity(shareIntent);
User avatar
icobasco
Senior Developer
Senior Developer
 
Posts: 108
Joined: Thu Jun 04, 2009 11:12 am
Location: Italy

Re: Going to Google maps with a address

Postby pranav09 » Tue Aug 10, 2010 7:47 am

You should use reverce geocoding to get location from address and point it out by current location.
Pranav
User avatar
pranav09
Senior Developer
Senior Developer
 
Posts: 128
Joined: Mon Jan 19, 2009 12:01 pm
Location: Ahmedabad, India

Re: Going to Google maps with a address

Postby evanrichter » Fri Aug 20, 2010 7:01 am

how about searching a business with a given lat & long? i want to pass my user's location to google maps and tell it to search for a keyword, like 'pizza'
evanrichter
Freshman
Freshman
 
Posts: 2
Joined: Wed Jul 14, 2010 5:19 pm

Top

Re: Going to Google maps with a address

Postby id » Mon Feb 21, 2011 10:10 am

how about searching a business with a given lat & long? i want to pass my user's location to google maps and tell it to search for a keyword, like 'pizza'

Substitute the above code from icobasco:
Code: Select all
String uri = "geo:" + latitude + ","+ longitude;

with:
Code: Select all
String uri = "geo:" + latitude + ","+ longitude + "?q=pizza";
id
Freshman
Freshman
 
Posts: 2
Joined: Mon Feb 21, 2011 9:57 am

Top

Return to Map Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests