How to open Google Maps using address?

前端 未结 7 1032
野趣味
野趣味 2021-02-07 06:57

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? Than

相关标签:
7条回答
  • 2021-02-07 07:26

    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);
    
    0 讨论(0)
提交回复
热议问题