-1

I want to show google map at by latitude and longitude.

Yet i am using Address to show Gmap.

Here is my code:

Intent intent = new Intent(Intent.ACTION_VIEW);
                intent.setData(Uri.parse("geo:0,0?q=" + ("2100 California St., Eureka, CA")));
                try {
                    startActivity(intent);
                } catch (Exception e) {
                    e.printStackTrace();
                }

i want to show map by latitude & longitude.

thanks in advance.

Siten
  • 4,515
  • 9
  • 39
  • 64
  • Have a look [at this SO answer](http://stackoverflow.com/questions/2662531/launching-google-maps-directions-via-an-intent-on-android/4433117#4433117) – Adil Soomro Aug 29 '11 at 07:39

1 Answers1

8

just put the latitude and longitude in the query like this:

            Intent intent = new Intent(Intent.ACTION_VIEW);
            intent.setData(Uri.parse("geo:0,0?q=" + ("40.7890011, -124.1719112")));
            try {
                startActivity(intent);
            } catch (Exception e) {
                e.printStackTrace();
            }
Mars
  • 4,197
  • 11
  • 39
  • 63