I want to show google map by passing latitude and longitude as destination and also my current location too
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 (Exce开发者_JAVA技巧ption e) {
e.printStackTrace();
}
i want to show map by latitude & longitude.
thanks in advance.
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();
}
精彩评论