TMapMarkerItem tourMarkerItem = new TMapMarkerItem();
TMapPoint tpoint = new TMapPoint(mapY, mapX);
tourMarkerItem.setTMapPoint(tpoint);
tourMarkerItem.setVisible(TMapMarkerItem.VISIBLE);
tourMarkerItem.setIcon(tourBitmap);
mMapView.setCenterPoint(mapX,mapY , false);
mMapView.addMarkerItem("tourMarker", tourMarkerItem);
1. TMapMarkerItem 객체를 생성한다.
2. TMapPoint 객체를 생성하고 좌표를 등록한다. ( point를 생성할때 (y,x) 순으로 매개변수를 받는다. 이것때문에 헷갈려서 헤맴)
3. 마커에 point를 지정한다.
4. 마커의 VISIBLE을 설정한다 (TMapMarkerItem.VISIBLE은 int값 1과 같음)
5. 마커의 이미지를 설정한다.
6. 맵의 중심이 마커로 이동
7. 맵에 마커표시
* 왜 다른 생성자는 x,y 순으로 받는데 TMapPoint만 y,x순으로 받냐? 헷갈리게!!
'Android' 카테고리의 다른 글
[안드로이드] NFC사용하기 (0) | 2016.07.20 |
---|---|
[안드로이드]GCM이란? node.js로 푸시알람 구현하기 (0) | 2016.06.25 |
[안드로이드]텍스트사이즈 sp와 dp의 차이 (0) | 2016.04.09 |
[안드로이드]인텐트로 액티비티간 이동 + 데이터전달 (0) | 2016.04.05 |
arraylist 데이터들을 json으로 만들기 (2) | 2016.02.24 |