Page 470 - 2
P. 470
return i;
}
public void ResetList(){
items.clear();
}
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
Tmap_invoke.LocationItemView itemview = new Tmap_invoke.LocationItemView(context);
TMapPOIItem item = items.get(i);
itemview.setName(item.getPOIName());
itemview.setAddress(item.getPOIAddress());
itemview.setDistance(item.getPOIPoint().toString());
return itemview;
}
}
}
}
<Weather_Manager>
package com.example.dbstp.mdp_2;
//import 생략
public class Weather_Manager {
private final String tag = "Bluetooth_Manager";
private Bluetooth_Data mBluetooth_data;
private Context mcontext;
public Weather_Manager(){
mBluetooth_data = new Bluetooth_Data();
}
public Bluetooth_Data Update_Weather(double lon, double lat, Context context){
this.mcontext = context;
Log.d(tag," 서비스 시작");
try {
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = builderFactory.newDocumentBuilder();
URL weather = new URL("http://www.kma.go.kr/wid/queryDFS.jsp?gridx=" + getGridxy(lat,lon).ge
t("x") + "&gridy=" + getGridxy(lat,lon).get("y"));
Log.d(tag,"x : " + getGridxy(lat,lon).get("x") + " y : " + getGridxy(lat,lon).get("y"));
InputStream input = getInputStreamUsingHTTP(weather);
Document document = builder.parse(input);
Log.d(tag,"inputstream 생성됨");
Log.d(tag,weather.toString());
processDocument(document,lon,lat);
}catch (ParserConfigurationException pce){
Log.d(tag,pce.getMessage());
}catch (MalformedURLException mue){
- 470 -