1
我有一个地址数组,我想在地图上显示它们(我知道方向是不可能的)。我使用INTENT,但它只显示1个地址!我怎样才能使它显示所有地址 这里是我的代码:在谷歌地图上显示多个位置android
for(int j=0; j<jarElements.length(); j++){
JSONObject distanceObj = jarElements.getJSONObject(j).getJSONObject("distance");
distanceStr = distanceObj.getString("value");
Log.v("finally getting distance : ", distanceStr);
buff.append("Distace from the location " + Addresses[j] + " is : " + distanceStr).append("\n").append("\n");
Intent is = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?saddr=" + Addresses[j] + "&daddr=" + distanceStr));
startActivity(Is);
选中此项:https://developers.google.com/maps/documentation/staticmaps/ –