map sdk version : 1.4.1.0
platform : android
가로 길이가 다른 비트맵을 각각 미선택/선택 이미지에 설정하면, 미선택 POIItem은 원하는 위치에 표시가 되는데 선택한 POIItem은 이미지의 좌측하단을 기준으로 위치가 표시되서 기존 위치보다 오른쪽에 표시되더라구요.
anchor는 값을 바꿔도 적용이 안되는 것 같아요.
동일한 비트맵을 미선택/선택 이미지로 사용하면 문제가 없는데, 해결 방법이 있을까요?
_
fun addMarker() {
mapView?.let { mapView ->
MapPOIItem().apply {
itemName = ; // 아무 이름
mapPoint = ; // lat, lng 위
markerType = MapPOIItem.MarkerType.CustomImage
selectedMarkerType = MapPOIItem.MarkerType.CustomImage
customImageBitmap = BitmapFactory.decodeResource(resources, R.drawable.ic_map_marker)
customSelectedImageBitmap = ; // 말풍선이 포함된 View를 Bitmap으로 변환
isCustomImageAutoscale = false
isShowCalloutBalloonOnTouch = false
setCustomImageAnchor(0.5f, 0.8f)
// customImageAnchorPointOffset = MapPOIItem.ImageOffset(...) // 결과 동일
}.also { mapPOIItem ->
mapView.addPOIItem(mapPOIItem)
}
}
}