How to open Google Maps using address?

user1166635 picture user1166635 · Apr 3, 2012 · Viewed 23.6k times · Source

How can I open Google Maps(using Intents or adding Google Maps into my application) with address? I have the address, but I don't have latitude/longitude. How can I do it? Thank you.

Answer

Maulik J picture Maulik J · Apr 3, 2012

use below code,

String map = "http://maps.google.co.in/maps?q=" + str_location; 

// where str_location is the address string

Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(map));
        startActivity(i);