我有一个代码,我正在检索纬度和经度信息。我有兴趣在地图上显示该信息。我想为谷歌地图创建一个链接,其中包含检索到的“经度”和“纬度”信息。我Linkify
为此使用如下:
**** Java代码**:
String text = "maps.google.com/?q=latitude,longitude";
TextView label = (TextView)findViewById(R.id.textView);
label.setText(text);
Pattern pattern = Pattern.compile("maps.google.com");
Linkify.addLinks(label, pattern, "http://");
但是这段代码不起作用。有人可以帮我写代码吗?我得到了类似的东西。我的经度和纬度没有与网址的其余部分相关联。