
이전에 입력됬던 좌표에 마커 띄우기 (기본상태)

마커 클릭한 상태
public class kakaoMap extends Activity {
static final String API_KEY = "b3ef0de9fffbec59ea802bc42dc0d902";
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
Intent intent = getIntent();
double x = intent.getDoubleExtra("x",0);
double y = intent.getDoubleExtra("y",0);
String name = intent.getStringExtra("name");
MapView mapView = new MapView(this);
mapView.setDaumMapApiKey(API_KEY);
RelativeLayout container = (RelativeLayout) findViewById(R.id.map_view);
container.addView(mapView);
// 중심점 변경
mapView.setMapCenterPoint(MapPoint.mapPointWithGeoCoord(x, y), true);
// 마커 생성 및 설정
MapPOIItem marker = new MapPOIItem();
marker.setItemName(name);
marker.setTag(0);
marker.setMapPoint(MapPoint.mapPointWithGeoCoord(x, y)); // 위치할 위도,경도
marker.setMarkerType(MapPOIItem.MarkerType.BluePin); // 기본으로 제공하는 BluePin 마커 모양.
marker.setSelectedMarkerType(MapPOIItem.MarkerType.RedPin); // 마커를 클릭했을때, 기본으로 제공하는 RedPin 마커 모양.
mapView.addPOIItem(marker);
}
}
맵 코딩된 부분입니다.
제가 알고싶은건
1. 처음에 떴을때 첫번째 이미지의 상태가 아니라 두번째 이미지의 상태가 되있게 하는 방법 있나요?
(켜자마자 마커위에 풍선말이 출력되있도록 할수 있을까요?)
2.풍선말 클릭 이벤트는 어떻게 만드나요?
3.(이건 답변 안해주셔도 됩니다. 해주시면 좋은데 안해주셔도 제가 직접 따로 찾아보겠습니다)
말풍선 클릭이벤트때 입력된 url의 웹페이지를 띄우는 이벤트 어떻게 만드나요?