初学者在这里!如何从作业中获取地址并将其转换为LatLng并将其添加到markerPoints()数组中?需要帮忙 !
try {
JSONObject jobj=jparser.makeHttpRequest(URL, "POST", params);
success=jobj.getInt("success");
s=jobj.getString("message");
if(success==1){
jobs=new ArrayList<HashMap<String,String>>();
JSONArray jAr=jobj.getJSONArray("routeplanning");
for (int i = 0; i < jAr.length(); i++) {
JSONObject job=jAr.getJSONObject(i);
HashMap<String , String> map=new HashMap<String, String>();
map.put("id", job.getString("id"));
map.put("tripid", job.getString("tripid"));
map.put("parcelid", job.getString("parcelid"));
map.put("date", job.getString("date"));
map.put("senderid", job.getString("senderid"));
map.put("driverid", job.getString("driverid"));
map.put("pickupaddress", job.getString("pickupaddress"));
map.put("deliveraddress", job.getString("deliveraddress"));
jobs.add(map);
;
}
}
}