Kakao
Maps API

Kakao 지도 Android API Documentation

Classes
MapView
- methods
MapPOIItem
- methods
MapCircle
- methods
MapPOIItem.ImageOffset
- fields
MapPoint
- methods
MapPoint.GeoCoordinate
- fields
MapPoint.PlainCoordinate
- fields
MapPointBounds
- fields
- methods
MapPolyline
- methods
MapReverseGeoCoder
- methods
CameraUpdateFactory
- methods
Interfaces
MapView.CurrentLocationEventListener
- methods
MapView.MapViewEventListener
- methods
MapView.OpenAPIKeyAuthenticationResultListener
- methods
MapView.POIItemEventListener
- methods
MapReverseGeoCoder.ReverseGeoCodingResultListener
- methods
Enums
MapView.CurrentLocationTrackingMode
- constants
MapView.MapType
- constants
MapPOIItem.CalloutBalloonButtonType
- constants
MapPOIItem.MarkerType
- constants
MapPOIItem.ShowAnimationType
- constants

Class MapView Constructors Methods

Kakao 지도 화면을 보여주는 View Class.
MapView 객체를 통해 지도 종류 지정, 지도 화면 이동/확대/축소, 현위치 트래킹 및 나침반 모드, POI Item(MapPOIItem) 관리, Polyline(MapPolyline) 관리 등의 기능이 제공된다.
MapView.OpenAPIKeyAuthenticationResultListener, MapView.MapViewEventListener,
MapView.CurrentLocationEventListener, MapView.POIItemEventListener interface들을 구현하는 객체들을 등록하여 지도 모듈에서 발생하는 다양한 이벤트들을 통보받을 수 있다.

일반적으로, Activity Class의 onCreate() 메소드에서 MapView 객체를 생성하여 Activity의 Content View에 포함되도록 설정하면 다음지도 화면을 구성할 수 있다.

Constructors

MapView

public MapView(Activity activity)

MapView

public MapView(Context context)

MapView

public MapView(Context context, AttributeSet attrs)

MapView

public MapView(Context context, AttributeSet attrs, int defStyle)

Methods

static boolean isMapTilePersistentCacheEnabled()

public static boolean isMapTilePersistentCacheEnabled()

지도 타일 이미지 Persistent Cache 기능 활성화 여부를 조회한다.

Returns
  • Persistent Cache 기능 활성화 여부

static void setMapTilePersistentCacheEnabled(boolean)

public static void setMapTilePersistentCacheEnabled(boolean enableCache)

지도 타일 이미지 Persistent Cache 기능은 네트워크를 통해 다운로드한 지도 이미지 데이터를 단말의 영구(persistent) 캐쉬 영역에 저장하는 기능이다.
같은 영역의 지도를 다시 로드할때 캐쉬에 저장된 지도 타일들은 네트워크를 거치지 않고 캐쉬에서 바로 로드하여 네트워크 사용량과 로딩 시간을 줄일 수 있다.
사용되지 않는 지도 타일 이미지 캐쉬 데이터는 MapView 동작 중에 자동으로 삭제되어 캐쉬 용량의 크기가 너무 커지지 않도록 조절된다.
Application의 Cache 영역 사용량이 부담이 되면 Cache 기능을 비활성화 하는 것이 좋다.
MapView가 동작하는 중에는 Cache 기능 활성화 설정 변경이 적용되지 않으며 MapView를 사용하기 전에 Cache 활성화 여부를 설정해야 한다.
일부 File I/O 성능이 좋지 않은 단말들에서는 캐쉬기능을 활성화 시 MapView의 성능이 떨어질수 있으며, 특정 단말들(SHW-M110S, SHW-M130K 등)은 File I/O 성능상의 이유로 setMapTilePersistentCacheEnabled() 메소드로 Cache 기능을 활성화 시키더라도 Cache 기능이 활성화되지 않는다.

Parameters
  • enableCache – Persistent Cache 기능 활성화 여부

static void clearMapTilePersistentCache()

public static void clearMapTilePersistentCache()

Application의 cache 디렉토리(android.content.Context.getCacheDir())에 저장된 지도 타일 캐쉬 데이터를 모두 삭제한다.
MapView가 동작 중인 상태에서도 사용가능하다.

void setOpenAPIKeyAuthenticationResultListener(MapView.OpenAPIKeyAuthenticationResultListener)

public void setOpenAPIKeyAuthenticationResultListener(MapView.OpenAPIKeyAuthenticationResultListener openAPIKeyAuthListener)

OpenAPIKeyAuthenticationResultListener interface를 구현하는 객체를 MapView 객체에 등록하여
APP KEY 인증 결과 이벤트를 통보받을 수 있다.

Parameters
  • openAPIKeyAuthListener – OpenAPIKeyAuthenticationResultListener interface 구현 객체

void setMapViewEventListener(MapView.MapViewEventListener)

public void setMapViewEventListener(MapView.MapViewEventListener mapViewEventListener)

MapViewEventListener interface를 구현하는 객체를 MapView 객체에 등록하여
지도 이동/확대/축소, 지도 화면 터치(Single Tap / Double Tap / Long Press) 이벤트를 통보받을 수 있다.

Parameters
  • mapViewEventListener – MapViewEventListener interface 구현 객체

void setCurrentLocationEventListener(MapView.CurrentLocationEventListener)

public void setCurrentLocationEventListener(MapView.CurrentLocationEventListener currentLocationEventListener)

CurrentLocationEventListener interface를 구현하는 객체를 MapView 객체에 등록하여
현위치 트래킹 이벤트를 통보받을 수 있다.

Parameters
  • currentLocationEventListener – CurrentLocationEventListener interface 구현 객체

void setPOIItemEventListener(MapView.POIItemEventListener)

public void setPOIItemEventListener(MapView.POIItemEventListener poiItemEventListener)

POIItemEventListener interface를 구현하는 객체를 MapView 객체에 등록하여
POI 관련 이벤트를 통보받을 수 있다.

Parameters
  • poiItemEventListener – POIItemEventListener interface 구현 객체

MapView.MapType getMapType()

public MapView.MapType getMapType()

현재 보여주고 있는 지도 종류를 확인한다.

Returns
  • 현재 보여주고 있는 지도 종류

void setMapType(MapView.MapType)

public void setMapType(MapView.MapType mapType)

지도 종류(기본 지도, 위성 지도, 하이브리드 지도)를 지정한다.

Parameters
  • mapType – 지도 종류

boolean isHDMapTileEnabled()

public boolean isHDMapTileEnabled()

고해상도 지도 타일 사용 여부를 조회 한다.
화면의 한변이 480 pixel 이상인 단말에 대해서는 기본값이 true이며 그렇지 않은 경우엔 고해상도 지도 타일 사용 설정 기본값은 false로 설정되어 있다.

Returns
  • 고해상도 지도 타일 사용 여부

void setHDMapTileEnabled(boolean)

public void setHDMapTileEnabled(boolean enabled)

고해상도 지도 타일 사용 여부를 설정한다.

Parameters
  • enabled – 고해상도 지도 타일 사용 여부

void setCurrentLocationTrackingMode(MapView.CurrentLocationTrackingMode)

public void setCurrentLocationTrackingMode(MapView.CurrentLocationTrackingMode trackingMode)

현위치 트래킹 모드 및 나침반 모드를 설정한다.
현위치 트래킹 모드 : 지도화면 중심을 단말의 현재 위치로 이동시켜줌
나침반 모드 : 단말의 방향에 따라 지도화면이 회전됨
현위치 트래킹 모드만 On시키거나 현위치 트래킹 모드, 나침반 모드 둘다 On 시킬 수 있다.
현위치 트래킹/나침반 모드를 활성화 시키면 현위치 정보가 설정된 MapView.CurrentLocationEventListener 객체에 전달된다.

Parameters
  • trackingMode – 현위치 트랙킹 모드

MapView.CurrentLocationTrackingMode getCurrentLocationTrackingMode()

public MapView.CurrentLocationTrackingMode getCurrentLocationTrackingMode()

현재 설정된 현위치 트랙킹 모드를 확인한다.

Returns
  • 현재 설정된 현위치 트랙킹 모드

void setShowCurrentLocationMarker(boolean)

public void setShowCurrentLocationMarker(boolean show)

현위치를 표시하는 아이콘(마커)를 화면에 표시할지 여부를 설정한다.
setCurrentLocationTrackingMode 메소드를
이용하여 현위치 트래킹 기능을 On 시키면 자동으로 현위치 마커가 보여지게 된다.
현위치 트래킹 기능을 Off한 후에 현위치 아이콘을 지도 화면에서 제거할 때 사용할 수 있다.

Parameters
  • show – 현위치 마커 표시 여부

boolean isShowingCurrentLocationMarker()

public boolean isShowingCurrentLocationMarker()

현위치를 표시하는 아이콘(마커)를 화면에 표시되는지 여부를 확인한다.

Returns
  • 현위치 마커 표시 여부

void setCurrentLocationRadius(int)

public void setCurrentLocationRadius(int meter)

현위치 마커를 중심으로 그릴 원의 반경을 지정한다.

Parameters
  • meter – 반경(단위:m)

void setCurrentLocationRadiusStrokeColor(int)

public void setCurrentLocationRadiusStrokeColor(int color)

현위치 마커를 중심으로 그릴 원의 선 색상을 지정한다.

Parameters
  • color – 선 색상, android.graphics.Color.argb(a, r, g, b)를 이용하여 지정한다.

void setCurrentLocationRadiusFillColor(int)

public void setCurrentLocationRadiusFillColor(int color)

현위치 마커를 중심으로 그릴 원의 채우기 색상을 지정한다.

Parameters
  • color – 채우기 색상, android.graphics.Color.argb(a, r, g, b)를 이용하여 지정한다.

void setCustomCurrentLocationMarkerImage(int, MapPOIItem.ImageOffset)

public void setCustomCurrentLocationMarkerImage(int id, MapPOIItem.ImageOffset anchorPointOffset)

현위치 아이콘으로 Custom 이미지를 사용하고자 하는 경우에 사용하고자 하는 Image의 resource id 와 지정한 이미지 상의 어느 지점이 현위치 좌표인지를 나타내는 ImageOffset 을 지정한다.
ImageOffset은 이미지 상의 Pixel 좌표를 지정한다. 이미지의 좌하단이 원점(0,0)이고 오른쪽 방향이 x+축, 위쪽 방향이 y+축이 된다.

예를들어, 이미지의 pixel 크기가 60×60인 Custom Image의 하단 변(edge)의 정중앙이 POI Item 좌표 지점에 해당된다면

poiItem.setCustomImageAnchorPointOffset(new MapPOIItem.ImageOffset(30,0))

위와 같이 지정할 수 있다.
hdpi 기준으로 작업된 이미지를 지정하면 다른 dpi단말에서는 이미지가 자동으로 적절한 크기로 scaling되어 화면에 나타난다.
(단말의 dpi와 상관없이 물리적으로 비슷한 크기의 마커 이미지 크기로 보이도록)

void setCustomCurrentLocationMarkerTrackingImage(int, MapPOIItem.ImageOffset)

public void setCustomCurrentLocationMarkerTrackingImage(int id, MapPOIItem.ImageOffset anchorPointOffset)

현위치 트래킹 아이콘으로 Custom 이미지를 사용하고자 하는 경우에 사용하고자 하는 Image의 resource id 와 지정한 이미지 상의 어느 지점이 현위치 좌표인지를 나타내는 ImageOffset 을 지정한다.
ImageOffset은 이미지 상의 Pixel 좌표를 지정한다. 이미지의 좌하단이 원점(0,0)이고 오른쪽 방향이 x+축, 위쪽 방향이 y+축이 된다.

예를들어, 이미지의 pixel 크기가 60×60인 Custom Image의 하단 변(edge)의 정중앙이 POI Item 좌표 지점에 해당된다면

poiItem.setCustomImageAnchorPointOffset(new MapPOIItem.ImageOffset(30,0))

위와 같이 지정할 수 있다.
hdpi 기준으로 작업된 이미지를 지정하면 다른 dpi단말에서는 이미지가 자동으로 적절한 크기로 scaling되어 화면에 나타난다.
(단말의 dpi와 상관없이 물리적으로 비슷한 크기의 마커 이미지 크기로 보이도록)

void setCustomCurrentLocationMarkerDirectionImage(int, MapPOIItem.ImageOffset)

public void setCustomCurrentLocationMarkerDirectionImage(int id, MapPOIItem.ImageOffset anchorPointOffset)

현위치 방향 아이콘으로 Custom 이미지를 사용하고자 하는 경우에 사용하고자 하는 Image의 resource id 와 지정한 이미지 상의 어느 지점이 현위치 좌표인지를 나타내는 ImageOffset 을 지정한다.
ImageOffset은 이미지 상의 Pixel 좌표를 지정한다. 이미지의 좌하단이 원점(0,0)이고 오른쪽 방향이 x+축, 위쪽 방향이 y+축이 된다.

예를들어, 이미지의 pixel 크기가 60×60인 Custom Image의 하단 변(edge)의 정중앙이 POI Item 좌표 지점에 해당된다면

poiItem.setCustomImageAnchorPointOffset(new MapPOIItem.ImageOffset(30,0))

위와 같이 지정할 수 있다.
hdpi 기준으로 작업된 이미지를 지정하면 다른 dpi단말에서는 이미지가 자동으로 적절한 크기로 scaling되어 화면에 나타난다.
(단말의 dpi와 상관없이 물리적으로 비슷한 크기의 마커 이미지 크기로 보이도록)

void setDefaultCurrentLocationMarker()

public void setDefaultCurrentLocationMarker()

기본 제공되는 현위치 아이콘 이미지를 사용

MapPoint getMapCenterPoint()

public MapPoint getMapCenterPoint()

현재 지도 화면의 중심점을 조회한다.

Returns
  • 현재 지도 화면의 중심점

int getZoomLevel()

public int getZoomLevel()

현재 지도 화면의 확대/축소 레벨을 조회 한다.

Returns
  • 현재 지도 화면의 확대/축소 레벨

float getMapRotationAngle()

public float getMapRotationAngle()

현재 지도화면의 회전 각도(360 degree)를 조회 한다.

Returns
  • 현재 지도화면의 회전 각도(360 degree)

void setMapCenterPoint(MapPoint, boolean)

public void setMapCenterPoint(MapPoint centerPoint, boolean animated)

지도 화면의 중심점을 설정한다.

Parameters
  • centerPoint – 지도화면 중심점을 나타내는 MapPoint 객체

void setMapCenterPointAndZoomLevel(MapPoint, int, boolean)

public void setMapCenterPointAndZoomLevel(MapPoint centerPoint, int zoomLevel, boolean animated)

지도 화면의 중심점과 확대/축소 레벨을 설정한다.

Parameters
  • centerPoint – 지도화면 중심점을 나타내는 MapPoint 객체

void setZoomLevel(int, boolean)

public void setZoomLevel(int zoomLevel, boolean animated)

지도 화면의 확대/축소 레벨을 설정한다.

Parameters
  • zoomLevel – 지도화면 확대 축소 레벨 값

void zoomIn(boolean)

public void zoomIn(boolean animated)

지도 화면을 한단계 확대한다. (더 좁은 영역이 크게 보임)
확대/축소 레벨 값이 1 감소됨

Parameters
  • animated – 지도화면의 확대 시 애니매이션 효과를 적용할지 여부

void zoomOut(boolean)

public void zoomOut(boolean animated)

지도 화면을 한단계 축소한다. (더 넓은 영역이 화면에 나타남)
확대/축소 레벨 값이 1 증가됨

Parameters
  • animated – 지도화면의 축소 시 애니매이션 효과를 적용할지 여부

void setMapRotationAngle(float, boolean)

public void setMapRotationAngle(float angle, boolean animated)

지도 화면의 회전 각도를 설정한다.

Parameters
  • angle – 회전 각도 (0~360도)

void fitMapViewAreaToShowMapPoints(MapPoint[])

public void fitMapViewAreaToShowMapPoints(MapPoint[] mapPoints)

지정한 지도 좌표들이 모두 화면에 나타나도록 지도화면 중심과 확대/축소 레벨을 자동조절한다.

Parameters
  • mapPoints – 화면에 모두 보여주고자 하는 지도 좌표 리스트

void refreshMapTiles()

public void refreshMapTiles()

지도 화면에 나타나는 지도 타일들을 지도 타일 서버에서 다시 받아와서 갱신한다.

void releaseUnusedMapTileImageResources()

public void releaseUnusedMapTileImageResources()

지도 타일 이미지 캐쉬 데이터 들을 삭제하여 메모리를 확보할 수 있다.

MapPOIItem[] getPOIItems()

public MapPOIItem[] getPOIItems()

지도화면에 보여주고 있는 POI 아이템 리스트를 조회할 수 있다.

Returns
  • POI Item 리스트

void addPOIItem(MapPOIItem)

public void addPOIItem(MapPOIItem poiItem)

지도화면에 POI Item 아이콘(마커)를 추가한다.

Parameters
  • poiItem – 추가할 POI Item 객체

void addPOIItems(MapPOIItem[])

public void addPOIItems(MapPOIItem[] poiItems)

지도화면에 POI Item 아이콘(마커) 리스트를 추가한다.

Parameters
  • poiItems – 추가할 POI Item 객체 리스트

void selectPOIItem(MapPOIItem, boolean)

public void selectPOIItem(MapPOIItem poiItem, boolean animated)

특정 POI Item 을 선택한다.
선택된 POI Item은 Callout Balloon(말풍선)이 아이콘(마커)위에 나타난다.

Parameters
  • poiItem – 선택할 POI Item 객체

void deselectPOIItem(MapPOIItem)

public void deselectPOIItem(MapPOIItem poiItem)

특정 POI Item 을 선택 해제한다.
선택 해제된 POI Item은 Callout Balloon(말풍선)이 POI 아이콘(마커)위에서 사라진다.

Parameters
  • poiItem – 선택 해제할 POI Item 객체

MapPOIItem findPOIItemByTag(int)

public MapPOIItem findPOIItemByTag(int tag)

지도화면에 추가된 POI Item 들 중에서 tag값이 일치하는 POI Item을 찾는다.

Parameters
  • tag – 찾고자 하는 POI Item의 tag 값

MapPOIItem[] findPOIItemByName(String)

public MapPOIItem[] findPOIItemByName(String itemName)

지도화면에 추가된 POI Item 들 중에서 이름이 일치하는 POI Item 객체를 찾는다.

Parameters
  • name – 찾고자 하는 POI Item의 이름 문자열

void removePOIItem(MapPOIItem)

public void removePOIItem(MapPOIItem poiItem)

특정 POI Item을 지도화면에서 제거한다.

Parameters
  • poiItem – 제거하고자 하는 POI Item 객체

void removePOIItems(MapPOIItem[])

public void removePOIItems(MapPOIItem[] poiItems)

POI Item 리스트를 지도화면에서 제거한다.

Parameters
  • poiItems – 제거하고자 하는 POI Item 객체 리스트

void removeAllPOIItems()

public void removeAllPOIItems()

지도 화면에 추가된 모든 POI Item들을 제거한다.

void fitMapViewAreaToShowAllPOIItems()

public void fitMapViewAreaToShowAllPOIItems()

지도 화면에 추가된 모든 POI Item들이
화면에 나타나도록 지도 화면 중심과 확대/축소 레벨을 자동으로 조정한다.

MapCircle[] getCircles()

public MapCircle[] getCircles()

void addCircle(MapCircle)

public void addCircle(MapCircle circle)

지도화면에 circle 을 추가한다.

Parameters
  • circle – 추가할 MapCircle 객체

MapCircle findCircleByTag(int)

public MapCircle findCircleByTag(int tag)

지도화면에 추가된 circle 들 중에서 tag값이 일치하는 circle 을 찾는다.

Parameters
  • tag – 찾고자 하는 circle 의 tag 값

void removeCircle(MapCircle)

public void removeCircle(MapCircle circle)

특정 circle 을 지도화면에서 제거한다.

Parameters
  • circle – 제거하고자 하는 circle 객체

void removeAllCircles()

public void removeAllCircles()

지도 화면에 추가된 모든 circle 을 제거한다.

void fitMapViewAreaToShowCircle(MapCircle)

public void fitMapViewAreaToShowCircle(MapCircle circle)

특정 Polyline의 모든 점들이 화면에 전부 나타나도록
지도 화면 중심과 확대/축소 레벨을 자동으로 조정한다.

Parameters
  • polyline – 화면에 보여주고자 하는 polyline

void fitMapViewAreaToShowAllCircle()

public void fitMapViewAreaToShowAllCircle()

지도 화면에 추가된 모든 Polyline 들이
화면에 나타나도록 지도 화면 중심과 확대/축소 레벨을 자동으로 조정한다.

MapPolyline[] getPolylines()

public MapPolyline[] getPolylines()

지도화면에 보여주고 있는 Polyline 리스트를 조회할 수 있다.

void addPolyline(MapPolyline)

public void addPolyline(MapPolyline polyline)

지도화면에 Polyline을 추가한다.

Parameters
  • polyline – 추가할 Polyline 객체

MapPolyline findPolylineByTag(int)

public MapPolyline findPolylineByTag(int tag)

지도화면에 추가된 Polyline들 중에서 tag값이 일치하는 Polyline을 찾는다.

Parameters
  • tag – 찾고자 하는 Polyline의 tag 값

void removePolyline(MapPolyline)

public void removePolyline(MapPolyline polyline)

특정 Polyline을 지도화면에서 제거한다.

Parameters
  • polyline – 제거하고자 하는 Polyline 객체

void removeAllPolylines()

public void removeAllPolylines()

지도 화면에 추가된 모든 Polyline을 제거한다.

void fitMapViewAreaToShowPolyline(MapPolyline)

public void fitMapViewAreaToShowPolyline(MapPolyline polyline)

특정 Polyline의 모든 점들이 화면에 전부 나타나도록
지도 화면 중심과 확대/축소 레벨을 자동으로 조정한다.

Parameters
  • polyline – 화면에 보여주고자 하는 polyline

void fitMapViewAreaToShowAllPolylines()

public void fitMapViewAreaToShowAllPolylines()

지도 화면에 추가된 모든 Polyline 들이
화면에 나타나도록 지도 화면 중심과 확대/축소 레벨을 자동으로 조정한다.

void moveCamera(CameraUpdate)

public void moveCamera(CameraUpdate cameraUpdate)

cameraUpdate 에 정의된 명령어에 따라 카메라를 재배치한다.

Class MapPOIItem Constructors Methods

지도화면 위에 추가되는 POI Item에 해당하는 Class.
지도화면 위에 POI 아이콘(마커)를 추가하기 위해서는 MapPOIItem 객체를 생성하여 MapView 객체에 등록해 주어야 한다.

MapView.addPOIItem(MapPOIItem)
MapView.addPOIItems(MapPOIItem[])

이미 제공되고 있는 POI Item 아이콘을 그대로 사용할 수도 있고, 개발자가 지정한 임의의 이미지를 POI Item 아이콘으로 사용할 수 있다.
MapView 객체에 등록된 POI Item을 사용자가 선택하면 POI Item 아이콘(마커)위에 말풍선(Callout Balloon)이 나타나게 되며 말풍선에는 POI Item 이름이 보여지게 된다.
단말 사용자가 길게 누른후(long press) 끌어서(dragging) 위치를 이동시킬 수 있는 Draggable POI Item 도 생성하여 MapView 에 등록할 수 있다.

Constructors

MapPOIItem

public MapPOIItem()

Methods

void setRotation(float)

public void setRotation(float rotation)

POI Item의 시계방향 rotation값을 지정한다.
default = 0.0f

Parameters
  • rotation – 각도(0.0f~360f)

void setAlpha(float)

public void setAlpha(float alpha)

POI Item의 alpha값을 지정한다.
default = 1.0f

Parameters
  • alpha – 투명도(0.0f~1.0f)

float getAlpha()

public float getAlpha()

alpha값을 가져온다.

float getRotation()

public float getRotation()

rotation값을 가져온다.

String getItemName()

public String getItemName()

POI Item 이름을 조회한다.

Returns
  • POI Item 이름

void setItemName(String)

public void setItemName(String itemName)

POI Item 이름을 지정한다.
POI Item 아이콘이 선택되면 나타나는 말풍선(Callout Balloon)에 POI Item 이름이 보여지게 된다.

Parameters
  • itemNamePOI Item 이름

MapPoint getMapPoint()

public MapPoint getMapPoint()

POI Item의 지도상 좌표를 조회한다.

Returns
  • 좌표객체

void setMapPoint(MapPoint)

public void setMapPoint(MapPoint mapPoint)

POI Item의 지도상 좌표를 설정한다.

Parameters
  • mapPoint – 좌표객체

MapPOIItem.MarkerType getMarkerType()

public MapPOIItem.MarkerType getMarkerType()

POI Item 아이콘(마커) 타입을 조회한다.

Returns
  • POI Item 아이콘(마커) 타입

void setMarkerType(MapPOIItem.MarkerType)

public void setMarkerType(MapPOIItem.MarkerType markerType)

POI Item 아이콘(마커) 타입을 설정한다.
기본 제공 POI Item 아이콘을 사용하거나, 개발자가 지정한 임의의 이미지를 POI Item 아이콘으로 사용할 수 있다.
default = MapPOIItem.MarkerType.BluePin

Parameters
  • markerTypePOI Item 아이콘(마커) 타입

MapPOIItem.MarkerType getSelectedMarkerType()

public MapPOIItem.MarkerType getSelectedMarkerType()

void setSelectedMarkerType(MapPOIItem.MarkerType)

public void setSelectedMarkerType(MapPOIItem.MarkerType markerType)

POI Item 선택 효과 아이콘(마커) 타입을 설정한다.
기본 제공 POI Item 아이콘을 사용하거나,
개발자가 지정한 임의의 이미지를 POI Item 선택 효과 아이콘으로 사용할 수 있다.
default = null

Parameters
  • markerTypePOI Item 아이콘(마커) 타입

MapPOIItem.ShowAnimationType getShowAnimationType()

public MapPOIItem.ShowAnimationType getShowAnimationType()

POI Item이 지도화면에 나타날때 애니매이션 종류 조회한다.

Returns
  • POI Item이 지도화면에 나타날때 애니매이션 종류

void setShowAnimationType(MapPOIItem.ShowAnimationType)

public void setShowAnimationType(MapPOIItem.ShowAnimationType showAnimationType)

POI Item이 지도화면에 나타날때 애니매이션 종류를 지정한다.
default = MapPOIItem.ShowAnimationType.NoAnimation

See Also
  • MapPOIItem.ShowAnimationType

boolean isShowCalloutBalloonOnTouch()

public boolean isShowCalloutBalloonOnTouch()

사용자가 POI Item 아이콘을 터치했을 때 말풍선(Callout Balloon)을 보여줄지 여부를 조회한다.

Returns
  • 터치 시 말풍선(Callout Balloon)을 보여줄지 여부

void setShowCalloutBalloonOnTouch(boolean)

public void setShowCalloutBalloonOnTouch(boolean showCalloutBalloonOnTouch)

사용자가 POI Item 아이콘을 터치했을 때 말풍선(Callout Balloon)을 보여줄지 여부를 설정한다.
default = true

Parameters
  • showCalloutBalloonOnTouch – 터치 시 말풍선(Callout Balloon)을 보여줄지 여부

boolean isShowDisclosureButtonOnCalloutBalloon()

public boolean isShowDisclosureButtonOnCalloutBalloon()

Disclosure Button 이미지 표시 여부 조회한다.

Returns
  • Disclosure Button 이미지 표시 여부

void setShowDisclosureButtonOnCalloutBalloon(boolean)

public void setShowDisclosureButtonOnCalloutBalloon(boolean showDisclosureButtonOnCalloutBalloon)

POI Item이 사용자에 의해 선택된 경우 나타나는 말풍선에 나타나는 글자 마지막에 Disclosure Button 이미지(꺽쇠(>)모양 이미지)를 표시할지 여부를 지정한다.
default = true

Parameters
  • showDisclosureButtonOnCalloutBalloon – Disclosure Button 이미지 표시 여부

void setLeftSideButtonResourceIdOnCalloutBalloon(int)

public void setLeftSideButtonResourceIdOnCalloutBalloon(int imageResourceId)

말풍선의 좌측 버튼에 개발자가 지정한 Custom 이미지를 사용하고자 하는 경우에 사용하고자 하는 Image의 resource id를 지정한다.
hdpi 기준으로 작업된 이미지를 지정하면 다른 dpi단말에서는 이미지가 자동으로 적절한 크기로 scaling되어 화면에 나타난다.
(단말의 dpi와 상관없이 물리적으로 비슷한 크기의 마커 이미지 크기로 보이도록)

See Also
  • MapPOIItem.CalloutBalloonButtonType

void setRightSideButtonResourceIdOnCalloutBalloon(int)

public void setRightSideButtonResourceIdOnCalloutBalloon(int imageResourceId)

말풍선의 우측 버튼에 개발자가 지정한 Custom 이미지를 사용하고자 하는 경우에 사용하고자 하는 Image의 resource id를 지정한다.
hdpi 기준으로 작업된 이미지를 지정하면 다른 dpi단말에서는 이미지가 자동으로 적절한 크기로 scaling되어 화면에 나타난다.
(단말의 dpi와 상관없이 물리적으로 비슷한 크기의 마커 이미지 크기로 보이도록)

See Also
  • MapPOIItem.CalloutBalloonButtonType

int getLeftSideButtonResourceIdOnCalloutBalloon()

public int getLeftSideButtonResourceIdOnCalloutBalloon()

말풍선의 좌측 버튼에 개발자가 지정한 Custom 이미지 resource id를 가져온다.

int getRightSideButtonResourceIdOnCalloutBalloon()

public int getRightSideButtonResourceIdOnCalloutBalloon()

말풍선의 우측 버튼에 개발자가 지정한 Custom 이미지 resource id를 가져온다.

boolean isDraggable()

public boolean isDraggable()

POI Item이 사용자가 위치를 변경할 수 있는지 확인한다.

void setDraggable(boolean)

public void setDraggable(boolean draggable)

사용자가 위치를 변경할 수 있는 POI Item을 생성하려면 draggable property를 true로 설정한다.
Draggable POI Item을 사용자가 터치하면 POI Item을 사용자가 이동할 수 있음을 알려주는 안내문구가 지도화면에 나타난다.
사용자는 POI Item을 길게 누른 후(long press) 원하는 위치로 끌어서(dragging) 위치를 변경할 수 있다.
변경된 POI Item의 위치는 MapView.POIItemEventListener.onDraggablePOIItemMoved 메소드를 통해 통보받을 수 있다.
default = false

See Also

int getTag()

public int getTag()

POI Item 객체에 지정된 tag 값을 조회한다.

Returns
  • tag 값

void setTag(int)

public void setTag(int tag)

POI Item 객체에 임의의 정수값(tag)을 지정할 수 있다.
MapView 객체에 등록된 POI Item들 중 특정 POI Item을 찾기 위한 식별자로 사용할 수 있다.
tag값을 반드시 지정해야 하는 것은 아니다.

See Also

Object getUserObject()

public Object getUserObject()

해당 POI Item과 관련된 정보를 저장하고 있는 임의의 객체를 조회한다.

Returns
  • 해당 POI Item과 관련된 정보를 저장하고 있는 객체

void setUserObject(Object)

public void setUserObject(Object userObject)

해당 POI Item과 관련된 정보를 저장하고 있는 임의의 객체를 저장하고자 할때 사용한다.
사용자가 POI Item을 선택하는 경우 등에 선택된 POI Item과 관련된 정보를 손쉽게 접근할 수 있다.

int getCustomImageResourceId()

public int getCustomImageResourceId()

markerType이 net.daum.mf.map.api.MapPOIItem.MarkerType.CustomImage인 경우
설정된 POI Item 아이콘 custom image의 resource id를 조회한다.

Returns
  • Custom Image Resource Id

int getCustomSelectedImageResourceId()

public int getCustomSelectedImageResourceId()

void setCustomImageResourceId(int)

public void setCustomImageResourceId(int imageResourceId)

markerType이 net.daum.mf.map.api.MapPOIItem.MarkerType.CustomImage인 경우에만 지정한다.
기본 제공되는 POI Item 아이콘 이미지를 사용하지 않고, 개발자가 지정한 Custom 이미지를 사용하고자 하는 경우에
사용하고자 하는 Image의 resource id를 지정한다.
hdpi 기준으로 작업된 이미지를 지정하면 다른 dpi단말에서는 이미지가 자동으로 적절한 크기로
scaling되어 화면에 나타난다. (단말의 dpi와 상관없이 물리적으로 비슷한 크기의 마커 이미지 크기로 보이도록)

See Also

void setCustomSelectedImageResourceId(int)

public void setCustomSelectedImageResourceId(int imageResourceId)

selectedMarkerType이 net.daum.mf.map.api.MapPOIItem.MarkerType.CustomImage인 경우에만 지정한다.
기본 제공되는 POI Item 아이콘 이미지를 사용하지 않고, 개발자가 지정한 Custom 이미지를 사용하고자 하는 경우에
사용하고자 하는 Image의 resource id를 지정한다.
hdpi 기준으로 작업된 이미지를 지정하면 다른 dpi단말에서는 이미지가 자동으로 적절한 크기로
scaling되어 화면에 나타난다. (단말의 dpi와 상관없이 물리적으로 비슷한 크기의 마커 이미지 크기로 보이도록)

See Also

MapPOIItem.ImageOffset getCustomImageAnchorPointOffset()

public MapPOIItem.ImageOffset getCustomImageAnchorPointOffset()

Custom Image Anchor Point Offset 좌표를 조회한다.

Returns
  • Custom Image Anchor Point Offset

void setCustomImageAnchorPointOffset(MapPOIItem.ImageOffset)

public void setCustomImageAnchorPointOffset(MapPOIItem.ImageOffset customImageAnchorPointOffset)

markerType이 CustomImage 인 경우에만 지정한다.
customImageResourceId property에 지정한 이미지 상의 어느 지점이 POI Item의 좌표 지점에 해당하는 지를 설정한다.
이미지 상의 Pixel 좌표를 지정한다. 이미지의 좌하단이 원점(0,0)이고 오른쪽 방향이 x+축, 위쪽 방향이 y+축이 된다.

예를들어, 이미지의 pixel 크기가 60×60인 Custom Image의 하단 변(edge)의 정중앙이 POI Item 좌표 지점에 해당된다면

poiItem.setCustomImageAnchorPointOffset(new MapPOIItem.ImageOffset(30,0))

위와 같이 지정할 수 있다.
값을 지정하지 않는 경우 이미지의 하단 중앙이 Anchor Point로 설정된다.

See Also

Class MapCircle Constructors Methods

지도화면 위에 추가되는 Circle에 해당하는 Class.
MapCircle에 객체를 생성하여 MapView객체에 등록해 주어야 한다.

 MapView.addCircle(MapCircle)
 

Constructors

MapCircle

public MapCircle(MapPoint center, int radius, int strokeColor, int fillColor)

Methods

int getStrokeColor()

public int getStrokeColor()

void setStrokeColor(int)

public void setStrokeColor(int strokeColor)

Circle의 선 색상을 지정한다.

Parameters
  • strokeColor – 선 색상, android.graphics.Color.argb(a, r, g, b)를 이용하여 지정한다.

int getFillColor()

public int getFillColor()

void setFillColor(int)

public void setFillColor(int fillColor)

Circle의 채우기 색상을 지정한다.

Parameters
  • fillColor – 채우기 색상, android.graphics.Color.argb(a, r, g, b)를 이용하여 지정한다.

MapPoint getCenter()

public MapPoint getCenter()

int getRadius()

public int getRadius()

void setRadius(int)

public void setRadius(int radius)

Circle의 반경을 지정한다.

Parameters
  • radius – 반경(단위:m)

void setCenter(MapPoint)

public void setCenter(MapPoint center)

Circle의 중심점을 지정한다.

Parameters
  • center – 중심점의 좌표 객체

int getId()

public int getId()

void setId(int)

public void setId(int id)

int getTag()

public int getTag()

Circle 객체에 지정된 tag 값을 조회한다.

Returns
  • tag 값

void setTag(int)

public void setTag(int tag)

Circle 객체에 임의의 정수값(tag)을 지정할 수 있다.
net.daum.mf.map.api.MapView 객체에 등록된 Circle들 중 특정 Circle을 찾기 위한 식별자로 사용할 수 있다.
tag값을 반드시 지정해야 하는 것은 아니다.

See Also
  • net.daum.mf.map.api.MapView#findCircleByTag(int)

Class MapPOIItem.ImageOffset Constructors Fields

이미지 상의 한 픽셀의 위치를 표현하는 데이터 구조
이미지의 좌하단이 offset (0,0)이 되고 오른쪽 방향이 x+ 위쪽 방향이 y+ 가 된다.

Constructors

MapPOIItem.ImageOffset

public MapPOIItem.ImageOffset(int offsetX,
                      int offsetY)
Parameters
  • offsetX – x 픽셀 좌표

Fields

offsetX

public int offsetX

x 픽셀 좌표

offsetY

public int offsetY

y 픽셀 좌표

Class MapPoint Methods

지도 화면 위 한 지점을 표현할 수 있는 Point Class.
지도 화면 위의 위치와 관련된 작업을 처리할 때 항상 MapPoint 객체를 사용한다.
MapPoint 객체는 위경도값(WGS84) 을 이용하여 생성하거나, 평면 좌표값(WCONG, CONG, WTM, …) 을 이용하여 생성할 수 있다.

Methods

static MapPoint mapPointWithGeoCoord(double, double)

public static MapPoint mapPointWithGeoCoord(double latitude, double longitude)

위경도 좌표 시스템(WGS84)의 좌표값으로 MapPoint 객체를 생성한다.

Parameters
  • latitude – 위도값

static MapPoint mapPointWithWCONGCoord(double, double)

public static MapPoint mapPointWithWCONGCoord(double xWCONG, double yWCONG)

WCONG 평면 좌표시스템의 좌표값으로 MapPoint 객체를 생성한다.

Parameters
  • xWCONGWCONG x 좌표값

static MapPoint mapPointWithCONGCoord(double, double)

public static MapPoint mapPointWithCONGCoord(double xCONG, double yCONG)

CONG 평면 좌표시스템의 좌표값으로 MapPoint 객체를 생성한다.

Parameters
  • xCONGCONG x 좌표값

static MapPoint mapPointWithScreenLocation(double, double)

public static MapPoint mapPointWithScreenLocation(double xPixel, double yPixel)

MapView의 좌상단 기준 Pixel 좌표값으로 MapPoint 객체를 생성한다.

Parameters
  • xPixel – Pixel x 좌표값

MapPoint.GeoCoordinate getMapPointGeoCoord()

public MapPoint.GeoCoordinate getMapPointGeoCoord()

MapPoint 객체가 나타내는 지점의 좌표값을 위경도 좌표시스템(WGS84)의 좌표값으로 조회한다.

Returns
  • 위경도 좌표시스템(WGS84)의 좌표값

MapPoint.PlainCoordinate getMapPointWCONGCoord()

public MapPoint.PlainCoordinate getMapPointWCONGCoord()

MapPoint 객체가 나타내는 지점의 좌표값을 WCONG 평면좌표계의 좌표값으로 조회한다.

Returns
  • WCONG 평면좌표계의 좌표값

MapPoint.PlainCoordinate getMapPointCONGCoord()

public MapPoint.PlainCoordinate getMapPointCONGCoord()

MapPoint 객체가 나타내는 지점의 좌표값을 CONG 평면좌표계의 좌표값으로 조회한다.

Returns
  • CONG 평면좌표계의 좌표값

MapPoint.PlainCoordinate getMapPointScreenLocation()

public MapPoint.PlainCoordinate getMapPointScreenLocation()

MapPoint 객체가 나타내는 지점의 좌표값을 MapView 좌상단 기준 Pixel 좌표값으로 조회한다.

Returns
  • MapView 좌상단 기준 Pixel 좌표값

Class MapPoint.GeoCoordinate Constructors Fields

Geoid 타원체 상의 한 점을 표현하는 지도 좌표 타입 (WGS84)
위도(latitude)와 경도(longitude)값으로 구성된다.

Constructors

MapPoint.GeoCoordinate

public MapPoint.GeoCoordinate(double latitude, double longitude)
Parameters
  • latitude – 위도 값

Fields

latitude

public double latitude

위도 값

longitude

public double longitude

경도 값

Class MapPoint.PlainCoordinate Constructors Fields

Geoid 상의 구면 좌표를 평면으로 프로젝션한 지도 좌표 정보를 저장하는 데이터 구조
평면 좌표 체계로는 WCONG, CONG, WTM, .. 등이 있다.

Constructors

MapPoint.PlainCoordinate

public MapPoint.PlainCoordinate(double x, double y)
Parameters
  • x – x 좌표값

Fields

x

public double x

x 좌표값

y

public double y

y 좌표값

Class MapPointBounds Constructors Fields Methods

Constructors

MapPointBounds

public MapPointBounds(MapPoint bottomLeft, MapPoint topRight)

Fields

bottomLeft

public final MapPoint bottomLeft

topRight

public final MapPoint topRight

Methods

boolean contains(MapPoint)

public boolean contains(MapPoint mapPoint)

MapPoint getCenter()

public MapPoint getCenter()

Class MapPolyline Constructors Methods

지도화면 위에 추가되는 Polyline에 해당하는 Class.
Polyline은 여러 개의 점들을 순서대로 연결한 선들의 집합이다.
지도화면 위에 Polyline을 추가하여 경로나 영역등을 표현할 수 있다.
지도화면 위에 Polyline을 추가하기 위해서는 MapPolyline 객체를 생성하여 MapView 객체에 등록해 주어야 한다.

MapView.addPolyline(MapPolyline)

Constructors

MapPolyline

public MapPolyline()

MapPolyline

public MapPolyline(int pointListCapacity)
Parameters
  • pointListCapacity – Polyline을 구성하는 점들의 좌표를 저장하는 Array의 메모리 할당 크기 (Polyline의 점 개수를 지정한다.)

Methods

Object[] getPointList()

public Object[] getPointList()

Polyline을 구성하는 점들의 리스트를 조회한다.

Returns
  • MapPoint array

int getPointCount()

public int getPointCount()

Polyline을 구성하는 점들의 개수를 조회한다.

Returns
  • Polyline을 구성하는 점들의 개수

MapPoint getPoint(int)

public MapPoint getPoint(int index)

(index + 1) 번째 점을 조회한다.

Parameters
  • index – 조회하고자 하는 점의 Index

void addPoint(MapPoint)

public void addPoint(MapPoint mapPoint)

Polyline에 점 하나를 추가한다.
Polyline 객체가 MapView에 등록된 후에는 점들을 추가해도 지도화면에 반영되지 않는다.

Parameters
  • mapPoint – 추가하고자 하는 점의 좌표 객체

void addPoints(MapPoint[])

public void addPoints(MapPoint[] mapPoints)

Polyline에 점 리스트를 추가한다.
Polyline 객체가 MapView에 등록된 후에는 점들을 추가해도 지도화면에 반영되지 않는다.

Parameters
  • mapPoints – 추가하고자 하는 점들의 좌표 객체 리스트

int getLineColor()

public int getLineColor()

void setLineColor(int)

public void setLineColor(int lineColor)

Polyline의 선 색상을 지정한다.

Parameters
  • lineColor – 선 색상, android.graphics.Color.argb(a, r, g, b)를 이용하여 지정한다.

int getTag()

public int getTag()

Polyline 객체에 지정된 tag 값을 조회한다.

Returns
  • tag 값

void setTag(int)

public void setTag(int tag)

Polyline 객체에 임의의 정수값(tag)을 지정할 수 있다.
MapView 객체에 등록된 Polyline들 중 특정 Polyline을 찾기 위한 식별자로 사용할 수 있다.
tag값을 반드시 지정해야 하는 것은 아니다.

See Also

Class MapReverseGeoCoder Constructors Methods

지도 좌표를 주소 정보로 변환(Reverse Geo-Coding)하는 기능을 제공하는 Class

Constructors

MapReverseGeoCoder

public MapReverseGeoCoder(String AppKey,
		                  MapPoint mapPoint,
		                  MapReverseGeoCoder.ReverseGeoCodingResultListener resultListener,
		                  Activity contextActivity)
Parameters
  • AppKey – Native APP KEY

Methods

void startFindingAddress()

public void startFindingAddress()

Reverse Geo-coding(Asynchronous) 서비스를 요청한다.
주소 정보는 비동기 방식으로 listener 객체에 전달된다.

void cancelFindingAddress()

public void cancelFindingAddress()

Reverse Geo-coding(Asynchronous) 서비스 요청을 취소한다.

static String findAddressForMapPoint(String, MapPoint)

public static String findAddressForMapPoint(String AppKey, MapPoint mapPoint)

동기(Synchronous, Blocking) 방식으로 Reverse Geo-coding 을 수행한다.
메소드를 호출한 thread는 Reverse Geo-Coding 서비스가 수행되는 동한 block된 후
변환된 주소정보를 리턴받는다.

Parameters
  • AppKey – Native APP KEY

Class CameraUpdateFactory Constructors Methods

Constructors

CameraUpdateFactory

public CameraUpdateFactory()

Methods

static CameraUpdate newMapPoint(MapPoint)

public static CameraUpdate newMapPoint(MapPoint mapPoint)

지도 화면을 현재의 확대/축소 레벨을 유지한 상태로 설정한 중심점으로 이동한다.

Parameters
  • mapPoint – 이동하는 지도 화면의 중심점

static CameraUpdate newMapPoint(MapPoint, float)

public static CameraUpdate newMapPoint(MapPoint mapPoint, float zoomLevel)

지도 화면을 설정한 확대/축소 레벨로 조정 및 설정한 중심점으로 이동한다.

Parameters
  • mapPoint – 이동하는 지도 화면의 중심점
  • zoomLevel – 변경된 지도 확대/축소 레벨

static CameraUpdate newMapPointAndDiameter(MapPoint, float)

public static CameraUpdate newMapPointAndDiameter(MapPoint mapPoint, float diameter)

설정한 중심점으로 이동하면서 지정한 직경(meter) 영역이 보이도록 줌레벨이 조정된다.
지정한 영역의 padding 값은 0

Parameters
  • mapPoint – 이동하는 지도 화면의 중심점
  • diameter – 직경(지름), meter단위

static CameraUpdate newMapPointAndDiameter(MapPoint, float, int)

public static CameraUpdate newMapPointAndDiameter(MapPoint mapPoint, float diameter, int padding)

설정한 중심점으로 이동하면서 지정한 직경(meter) 영역이 보이도록 줌레벨이 조정된다.

Parameters
  • mapPoint – 이동하는 지도 화면의 중심점
  • diameter – 직경(지름), meter단위
  • padding – 지정한 영역의 padding 값

static CameraUpdate newMapPointBounds(MapPointBounds)

public static CameraUpdate newMapPointBounds(MapPointBounds mapPointBounds)

지정한 영역이 화면에 나타나도록 지도화면 중심과 확대/축소 레벨을 자동조절한다.
지정한 영역의 padding 값은 0.

Parameters
  • mapPointBounds – 화면에 보여주고자 하는 영역 (MapPoint 타입의 좌하단 지점과 우상단 지점을 인자로 갖는 구조체)

static CameraUpdate newMapPointBounds(MapPointBounds, int)

public static CameraUpdate newMapPointBounds(MapPointBounds mapPointBounds, int padding)

padding 값을 반영한 지정한 영역이 화면에 지정된 나타나도록 지도화면 중심과 확대/축소 레벨을 자동조절한다.

Parameters
  • bounds – 화면에 보여주고자 하는 영역 (MapPoint 타입의 좌하단 지점과 우상단 지점을 인자로 갖는 구조체)
  • padding – 지정한 영역의 padding 값

static CameraUpdate newMapPointBounds(MapPointBounds, int, float, float)

public static CameraUpdate newMapPointBounds(MapPointBounds mapPointBounds,
                             int padding,
                             float minZoomLevel,
                             float maxZoomLevel)

padding 값을 반영한 지정한 영역이 화면에 지정된 나타나도록 하되 지정한 최소 레벨과 최대 레벨 범위 안의 지도화면 중심과 확대/축소 레벨을 자동조절 한다.

Parameters
  • bounds – 화면에 보여주고자 하는 영역 (MapPoint 타입의 좌하단 지점과 우상단 지점을 인자로 갖는 구조체)
  • padding – 지정한 영역의 padding 값
  • minZoomLevel – 지도 화면 최대 확대 레벨 값 (-2~12, 값이 작을수록 더 좁은 영역이 화면이 보임. 지도 화면이 확대됨)
  • maxZoomLevel – 지도 화면 최대 축소 레벨 값 (-2~12, 값이 클수록 더 넓은 영역이 화면이 보임. 지도 화면이 축소됨)

Interface MapView.CurrentLocationEventListener Methods

CurrentLocationEventListener interface를 구현하는 객체를 MapView 객체에 등록하여
현위치 트래킹 이벤트를 통보받을 수 있다.

Methods

void onCurrentLocationUpdate(MapView, MapPoint, float)

void onCurrentLocationUpdate(MapView mapView, MapPoint currentLocation, float accuracyInMeters)

단말의 현위치 좌표값을 통보받을 수 있다.

MapView.setCurrentLocationTrackingMode 메소드를 통해
사용자 현위치 트래킹 기능이 켜진 경우(CurrentLocationTrackingMode.TrackingModeOnWithoutHeading, CurrentLocationTrackingMode.TrackingModeOnWithHeading)
단말의 위치에 해당하는 지도 좌표와 위치 정확도가 주기적으로 delegate 객체에 통보된다.

Parameters
  • mapView – MapView 객체

void onCurrentLocationDeviceHeadingUpdate(MapView, float)

void onCurrentLocationDeviceHeadingUpdate(MapView mapView, float headingAngle)

단말의 방향(Heading) 각도값을 통보받을 수 있다.

MapView.setCurrentLocationTrackingMode 메소드를 통해
사용자 현위치 트래킹과 나침반 모드가 켜진 경우(CurrentLocationTrackingMode.TrackingModeOnWithHeading)
단말의 방향 각도값이 주기적으로 delegate 객체에 통보된다.

Parameters
  • mapView – MapView 객체

void onCurrentLocationUpdateFailed(MapView)

void onCurrentLocationUpdateFailed(MapView mapView)

현위치 갱신 작업에 실패한 경우 호출된다.

Parameters
  • mapView – MapView 객체

void onCurrentLocationUpdateCancelled(MapView)

void onCurrentLocationUpdateCancelled(MapView mapView)

현위치 트랙킹 기능이 사용자에 의해 취소된 경우 호출된다.
처음 현위치를 찾는 동안에 현위치를 찾는 중이라는 Alert Dialog 인터페이스가 사용자에게 노출된다.
첫 현위치를 찾기전에 사용자가 취소 버튼을 누른 경우 호출 된다.

Parameters
  • mapView – MapView 객체

Interface MapView.MapViewEventListener Methods

MapViewEventListener interface를 구현하는 객체를 MapView 객체에 등록하여
지도 이동/확대/축소, 지도 화면 터치(Single Tap / Double Tap / Long Press) 이벤트를 통보받을 수 있다.

Methods

void onMapViewInitialized(MapView)

void onMapViewInitialized(MapView mapView)

MapView가 사용가능 한 상태가 되었음을 알려준다.
onMapViewInitialized()가 호출된 이후에 MapView 객체가 제공하는 지도 조작 API들을 사용할 수 있다.

void onMapViewCenterPointMoved(MapView, MapPoint)

void onMapViewCenterPointMoved(MapView mapView, MapPoint mapCenterPoint)

지도 중심 좌표가 이동한 경우 호출된다.

Parameters
  • mapView – MapView 객체

void onMapViewZoomLevelChanged(MapView, int)

void onMapViewZoomLevelChanged(MapView mapView, int zoomLevel)

지도 확대/축소 레벨이 변경된 경우 호출된다.

Parameters
  • mapView – MapView 객체

void onMapViewSingleTapped(MapView, MapPoint)

void onMapViewSingleTapped(MapView mapView, MapPoint mapPoint)

사용자가 지도 위를 터치한 경우 호출된다.

Parameters
  • mapView – MapView 객체

void onMapViewDoubleTapped(MapView, MapPoint)

void onMapViewDoubleTapped(MapView mapView, MapPoint mapPoint)

사용자가 지도 위 한 지점을 더블 터치한 경우 호출된다.

Parameters
  • mapView – MapView 객체

void onMapViewLongPressed(MapView, MapPoint)

void onMapViewLongPressed(MapView mapView, MapPoint mapPoint)

사용자가 지도 위 한 지점을 길게 누른 경우(long press) 호출된다.

Parameters
  • mapView – MapView 객체

void onMapViewDragStarted(MapView, MapPoint)

void onMapViewDragStarted(MapView mapView, MapPoint mapPoint)

사용자가 지도 드래그를 시작한 경우 호출된다.

Parameters
  • mapView – MapView 객체

void onMapViewDragEnded(MapView, MapPoint)

void onMapViewDragEnded(MapView mapView, MapPoint mapPoint)

사용자가 지도 드래그를 끝낸 경우 호출된다.

Parameters
  • mapView – MapView 객체

void onMapViewMoveFinished(MapView, MapPoint)

void onMapViewMoveFinished(MapView mapView, MapPoint mapPoint)

지도의 이동이 완료된 경우 호출된다.

Parameters
  • mapView – MapView 객체

Interface MapView.OpenAPIKeyAuthenticationResultListener Methods

OpenAPIKeyAuthenticationResultListener interface를 구현하는 객체를 MapView 객체에 등록하여
APP KEY 인증 결과 이벤트를 통보받을 수 있다.

Methods

void onDaumMapOpenAPIKeyAuthenticationResult(MapView, int, String)

void onDaumMapOpenAPIKeyAuthenticationResult(MapView mapView, int resultCode, String resultMessage)

설정한 APP KEY값을 인증 서버에 요청하여 인증 여부를 통보받을 수 있다.
APP KEY 는 Android Application Package Name당 하나씩 카카오 개발자 APP KEY 발급 페이지 를 통해서 발급할 수 있다.

Parameters
  • mapView – MapView 객체

Interface MapView.POIItemEventListener Methods

POIItemEventListener interface를 구현하는 객체를 MapView 객체에 등록하여
POI 관련 이벤트를 통보받을 수 있다.

Methods

void onPOIItemSelected(MapView, MapPOIItem)

void onPOIItemSelected(MapView mapView, MapPOIItem poiItem)

단말 사용자가 POI Item을 선택한 경우 호출된다.
사용자가 MapView 에 등록된 POI Item 아이콘(마커)를 터치한 경우 호출된다.

Parameters
  • mapView – MapView 객체

void onCalloutBalloonOfPOIItemTouched(MapView, MapPOIItem)

@Deprecated
void onCalloutBalloonOfPOIItemTouched(MapView mapView, MapPOIItem poiItem)

Deprecated.

Parameters
  • mapView – MapView 객체

void onCalloutBalloonOfPOIItemTouched(MapView, MapPOIItem, MapPOIItem.CalloutBalloonButtonType)

void onCalloutBalloonOfPOIItemTouched(MapView mapView,
                                    MapPOIItem poiItem,
                                    MapPOIItem.CalloutBalloonButtonType buttonType)

void onDraggablePOIItemMoved(MapView, MapPOIItem, MapPoint)

void onDraggablePOIItemMoved(MapView mapView, MapPOIItem poiItem, MapPoint newMapPoint)

단말 사용자가 길게 누른 후(long press) 끌어서(dragging) 위치 이동이 가능한 POI Item의 위치를 이동시킨 경우 호출된다.
이동가능한 POI Item을 Draggable POI Item 이라 한다.

Parameters
  • mapView – MapView 객체

Interface MapReverseGeoCoder.ReverseGeoCodingResultListener Methods

Reverse Geo-Coding 결과를 비동기적으로 통보받는 listener 객체가 구현해야하는 interface

Methods

void onReverseGeoCoderFoundAddress(MapReverseGeoCoder, String)

void onReverseGeoCoderFoundAddress(MapReverseGeoCoder rGeoCoder, String addressString)

주소를 찾은 경우 호출된다.

Parameters
  • rGeoCoder – MapReverseGeoCoder 객체

void onReverseGeoCoderFailedToFindAddress(MapReverseGeoCoder)

void onReverseGeoCoderFailedToFindAddress(MapReverseGeoCoder rGeoCoder)

Reverse Geo-Coding 서비스 호출에 실패한 경우 호출된다.

Parameters
  • rGeoCoder – MapReverseGeoCoder 객체

Enum MapView.CurrentLocationTrackingMode Constants

현위치 트랙킹 타입 enumeration

Constants

TrackingModeOff

public static final MapView.CurrentLocationTrackingMode TrackingModeOff

현위치 트랙킹 모드 및 나침반 모드 Off

TrackingModeOnWithoutHeading

public static final MapView.CurrentLocationTrackingMode TrackingModeOnWithoutHeading

현위치 트랙킹 모드 On, 단말의 위치에 따라 지도 중심이 이동한다. 나침반 모드는 꺼진 상태

TrackingModeOnWithHeading

public static final MapView.CurrentLocationTrackingMode TrackingModeOnWithHeading

현위치 트랙킹 모드 On + 나침반 모드 On, 단말의 위치에 따라 지도 중심이 이동하며 단말의 방향에 따라 지도가 회전한다.(나침반 모드 On)

Enum MapView.MapType Constants

지도 종류 enumeration

Constants

Standard

public static final MapView.MapType Standard

기본 지도

Satellite

public static final MapView.MapType Satellite

위성 지도

Hybrid

public static final MapView.MapType Hybrid

하이브리드 지도

Enum MapPOIItem.CalloutBalloonButtonType Constants

POI Item 말풍선 버튼 타입 enumeration

Constants

MainButton

public static final MapPOIItem.CalloutBalloonButtonType MainButton

LeftSideButton

public static final MapPOIItem.CalloutBalloonButtonType LeftSideButton

RightSideButton

public static final MapPOIItem.CalloutBalloonButtonType RightSideButton

Enum MapPOIItem.MarkerType Constants

POI Item 아이콘(마커) 타입 enumeration

Constants

BluePin

public static final MapPOIItem.MarkerType BluePin

파란색 핀

RedPin

public static final MapPOIItem.MarkerType RedPin

빨간색 핀

YellowPin

public static final MapPOIItem.MarkerType YellowPin

노란색 핀

CustomImage

public static final MapPOIItem.MarkerType CustomImage

개발자가 지정한 POI Item 아이콘 이미지 사용

Enum MapPOIItem.ShowAnimationType Constants

POI Item이 화면에 추가될때 애니매이션 타입 enumeration

Constants

NoAnimation

public static final MapPOIItem.ShowAnimationType NoAnimation

애니매이션 없음

DropFromHeaven

public static final MapPOIItem.ShowAnimationType DropFromHeaven

POI Item 아이콘이 하늘에서 지도 위로 떨어지는 애니매이션

SpringFromGround

public static final MapPOIItem.ShowAnimationType SpringFromGround

POI Item 아이콘이 땅위에서 스프링처럼 튀어나오는 듯한 애니매이션