안드로이드 개발 질문/답변
(글 수 45,052)
itemizedoverlay에서 ontap 이벤트의 순서에 관해 질문을 드립니다.
지금 만들고 있는 앱을 간략히 소개드리면
맵을 터치 -> 터치한 좌표를 서버에 송신 -> 서버가 분석 후 인근 지역의 사진을 클라이언트(앱)로 전송 ->
전송받은 좌표와 이미지를 이용하여 마커를 생성 -> 마커를 클릭하면 마커에 송신된 이미지를 크게 보여주는 이미지 뷰어 액티비티 실행
의 시나리오를 갖고 있습니다.
public boolean onTap(GeoPoint p, MapView mapView) {
super.onTap(p, mapView);
try {
onRequest(p);
} catch (IOException e) {
e.printStackTrace();
}
return true;//super.onTap(p, mapView);
}
public boolean onTap(int index) {
Intent i = new Intent(mContext, ImagePopup.class);
i.putExtra("filename", android.os.Environment.getExternalStorageDirectory().getAbsolutePath() + "/temporal/" + index + ".jpg");
mContext.startActivity(i);
return false;
}
소스를 이렇게 짜뒀는데
디버그나 로그를 남겨보면
마커를 찍을 때 먼저 onRequest가 실행 된 후에 마커가 찍혀서 이미지가 넘어갑니다.
먼저 마커가 찍히게 하는 방법이 없을까요?
지금 만들고 있는 앱을 간략히 소개드리면
맵을 터치 -> 터치한 좌표를 서버에 송신 -> 서버가 분석 후 인근 지역의 사진을 클라이언트(앱)로 전송 ->
전송받은 좌표와 이미지를 이용하여 마커를 생성 -> 마커를 클릭하면 마커에 송신된 이미지를 크게 보여주는 이미지 뷰어 액티비티 실행
의 시나리오를 갖고 있습니다.
public boolean onTap(GeoPoint p, MapView mapView) {
super.onTap(p, mapView);
try {
onRequest(p);
} catch (IOException e) {
e.printStackTrace();
}
return true;//super.onTap(p, mapView);
}
public boolean onTap(int index) {
Intent i = new Intent(mContext, ImagePopup.class);
i.putExtra("filename", android.os.Environment.getExternalStorageDirectory().getAbsolutePath() + "/temporal/" + index + ".jpg");
mContext.startActivity(i);
return false;
}
소스를 이렇게 짜뒀는데
디버그나 로그를 남겨보면
마커를 찍을 때 먼저 onRequest가 실행 된 후에 마커가 찍혀서 이미지가 넘어갑니다.
먼저 마커가 찍히게 하는 방법이 없을까요?