开发者

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();
            }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜