[React Native] react-native-naver-map


1. react-native-naver-map

μ°Έμ‘°

원본: react-native-naver-map

넀이버맡 API

Directions 15

Geocoding

Reverse Geocoding

μ„€μΉ˜

npm install react-native-nmap --save;

  • React Native 0.60+
$ cd ios/ && pod install

  • React Native <= 0.59
$ react-native link react-native-nmap
$ cd ios/ && pod install

ios의 경우 git-lfs μ„€μΉ˜κ°€ ν•„μš”ν•©λ‹ˆλ‹€. μ°Έκ³ 

μ•ˆλ“œλ‘œμ΄λ“œ μΆ”κ°€ μ„€μ •

넀이버 맡 μ•ˆλ“œλ‘œμ΄λ“œ SDK λ¬Έμ„œλ₯Ό 따라 API킀와 λ ˆν¬μ§€ν„°λ¦¬ 경둜λ₯Ό μΆ”κ°€ν•©λ‹ˆλ‹€

/android/build.gradle νŒŒμΌμ— μ•„λž˜μ™€ 같이 λ ˆν¬μ§€ν„°λ¦¬λ₯Ό μΆ”κ°€ν•©λ‹ˆλ‹€

⚠️ Bintray 지원 쀑단에 μ˜ν•΄ jfrog둜 μˆ˜μ •λ˜μ—ˆμŠ΅λ‹ˆλ‹€

allprojects {
    repositories {
        google()
        jcenter()
        // 넀이버 지도 μ €μž₯μ†Œ
        maven {
            url '<https://naver.jfrog.io/artifactory/maven/>'
        }
    }
}

/android/app/src/AndroidManifest.xml에 μ•„λž˜μ™€ 같이 μΆ”κ°€ν•˜κ³  λ°œκΈ‰λ°›μ€ ν΄λΌμ΄μ–ΈνŠΈ μ•„μ΄λ””λ‘œ λ°”κΏ”μ€λ‹ˆλ‹€.

<manifest>
    <application>
        <meta-data
            android:name="com.naver.maps.map.CLIENT_ID"
            android:value="YOUR_CLIENT_ID_HERE" />
    </application>
</manifest>

IOS μΆ”κ°€ μ„€μ •

넀이버 맡 IOS SDK λ¬Έμ„œλ₯Ό 따라 API킀와 λ ˆν¬μ§€ν„°λ¦¬ 경둜λ₯Ό μΆ”κ°€ν•©λ‹ˆλ‹€.

info.plist에 μ•„λž˜μ™€ 같이 λ°œκΈ‰λ°›μ€ ν΄λΌμ΄μ–ΈνŠΈ 아이디λ₯Ό μΆ”κ°€ν•΄μ€λ‹ˆλ‹€.

!https://user-images.githubusercontent.com/49827449/66392740-b2fd5f00-ea0b-11e9-8c38-23e604b1009d.png

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "<http://www.apple.com/DTDs/PropertyList-1.0.dtd>">
<plist version="1.0">
<dict>
...
    <key>NMFClientId</key>
    <string>YOUR_CLIENT_ID_HERE</string>
...
<dict>
<plist>

μ»΄ν¬λ„ŒνŠΈ

νƒ€μž…μŠ€ν¬λ¦½νŠΈ νƒ€μž… μ •μ˜κ°€ ν¬ν•¨λ˜μ–΄ μžˆμ–΄ νƒ€μž…μŠ€ν¬λ¦½νŠΈ μ‚¬μš©μ„ μΆ”μ²œν•©λ‹ˆλ‹€.

κΈ°λ³Έ νƒ€μž…

export interface Coord {
  latitude: number;
  longitude: number;
}
export interface Region extends Coord {
  latitudeDelta: number;
  longitudeDelta: number;
}
export interface Rect {
  left?: number;
  top?: number;
  right?: number;
  bottom?: number;
}
  • center?: Coord & { zoom?: number; tilt?: number; bearing?: number; }: 쀑심 μ’Œν‘œλ₯Ό λ‚˜νƒ€λƒ…λ‹ˆλ‹€. CoordλŠ” μ’Œν‘œλ₯Ό λ‚˜νƒ€λ‚΄λŠ” 객체이며, zoom은 ν™•λŒ€/μΆ•μ†Œ μˆ˜μ€€, tiltλŠ” μ‹œμ•Όμ˜ 기울기, bearing은 μ§€λ„μ˜ νšŒμ „ 각도λ₯Ό λ‚˜νƒ€λƒ…λ‹ˆλ‹€.
  • tilt?: number: μ‹œμ•Όμ˜ 기울기λ₯Ό λ‚˜νƒ€λƒ…λ‹ˆλ‹€.
  • bearing?: number: μ§€λ„μ˜ νšŒμ „ 각도λ₯Ό λ‚˜νƒ€λƒ…λ‹ˆλ‹€.
  • mapPadding?: Rect: μ§€λ„μ˜ 여백을 λ‚˜νƒ€λ‚΄λŠ” μ˜μ—­μ„ μ„€μ •ν•©λ‹ˆλ‹€.
  • logoMargin?: Rect: 둜고의 여백을 λ‚˜νƒ€λ‚΄λŠ” μ˜μ—­μ„ μ„€μ •ν•©λ‹ˆλ‹€.
  • logoGravity?: Gravity: 둜고의 μœ„μΉ˜λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • onInitialized?: Function: 지도가 μ΄ˆκΈ°ν™”λœ ν›„ ν˜ΈμΆœλ˜λŠ” 콜백 ν•¨μˆ˜μž…λ‹ˆλ‹€.
  • onCameraChange?: (event: { latitude: number; longitude: number; zoom: number; contentsRegion: [Coord, Coord, Coord, Coord, Coord]; coveringRegion: [Coord, Coord, Coord, Coord, Coord]; }) => void: μΉ΄λ©”λΌμ˜ μœ„μΉ˜κ°€ 변경될 λ•Œ ν˜ΈμΆœλ˜λŠ” 콜백 ν•¨μˆ˜μž…λ‹ˆλ‹€.
  • onMapClick?: (event: { x: number; y: number; latitude: number; longitude: number; }) => void: 지도λ₯Ό ν΄λ¦­ν–ˆμ„ λ•Œ ν˜ΈμΆœλ˜λŠ” 콜백 ν•¨μˆ˜μž…λ‹ˆλ‹€.
  • onTouch?: () => void: 지도 ν„°μΉ˜ μ΄λ²€νŠΈκ°€ λ°œμƒν–ˆμ„ λ•Œ ν˜ΈμΆœλ˜λŠ” 콜백 ν•¨μˆ˜μž…λ‹ˆλ‹€.
  • showsMyLocationButton?: boolean: λ‚΄ μœ„μΉ˜ λ²„νŠΌμ˜ ν‘œμ‹œ μ—¬λΆ€λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • compass?: boolean: λ‚˜μΉ¨λ°˜μ˜ ν‘œμ‹œ μ—¬λΆ€λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • scaleBar?: boolean: μΆ•μ²™ λ§‰λŒ€μ˜ ν‘œμ‹œ μ—¬λΆ€λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • zoomControl?: boolean: 쀌 컨트둀의 ν‘œμ‹œ μ—¬λΆ€λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • mapType?: MapType: μ§€λ„μ˜ μœ ν˜•μ„ μ„€μ •ν•©λ‹ˆλ‹€.
  • minZoomLevel?: number: μ΅œμ†Œ 쀌 λ ˆλ²¨μ„ μ„€μ •ν•©λ‹ˆλ‹€.
  • maxZoomLevel?: number: μ΅œλŒ€ 쀌 λ ˆλ²¨μ„ μ„€μ •ν•©λ‹ˆλ‹€.
  • buildingHeight?: number: 건물의 높이λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • nightMode?: boolean: μ•Όκ°„ λͺ¨λ“œμ˜ μ‚¬μš© μ—¬λΆ€λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • scrollGesturesEnabled?: boolean: 슀크둀 제슀처의 μ‚¬μš© μ—¬λΆ€λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • zoomGesturesEnabled?: boolean: 쀌 제슀처의 μ‚¬μš© μ—¬λΆ€λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • tiltGesturesEnabled?: boolean: μ‹œμ•Ό 기울기 제슀처의 μ‚¬μš© μ—¬λΆ€λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • rotateGesturesEnabled?: boolean: νšŒμ „ 제슀처의 μ‚¬μš© μ—¬λΆ€λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • stopGesturesEnabled?: boolean: 쀑지 제슀처의 μ‚¬μš© μ—¬λΆ€λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • animateToCoordinate: (coord: Coord) => void: νŠΉμ • μ’Œν‘œλ‘œ μ• λ‹ˆλ©”μ΄μ…˜μ„ μ‚¬μš©ν•˜μ—¬ μ΄λ™ν•©λ‹ˆλ‹€.
  • animateToTwoCoordinates: (c1: Coord, c2: Coord) => void: 두 개의 μ’Œν‘œ μ‚¬μ΄λ‘œ μ• λ‹ˆλ©”μ΄μ…˜μ„ μ‚¬μš©ν•˜μ—¬ μ΄λ™ν•©λ‹ˆλ‹€.
  • animateToCoordinates: (coords: Coord[], bounds?: { top: number; bottom: number; left: number; right: number; }) => void: μ—¬λŸ¬ μ’Œν‘œλ‘œ μ• λ‹ˆλ©”μ΄μ…˜μ„ μ‚¬μš©ν•˜μ—¬ μ΄λ™ν•©λ‹ˆλ‹€. bounds λ§€κ°œλ³€μˆ˜λ₯Ό μ‚¬μš©ν•˜μ—¬ μ§€μ •λœ 경계 λ‚΄μ—μ„œ μ΄λ™ν•©λ‹ˆλ‹€.
  • animateToRegion: (region: Region) => void: νŠΉμ • μ˜μ—­μœΌλ‘œ μ• λ‹ˆλ©”μ΄μ…˜μ„ μ‚¬μš©ν•˜μ—¬ μ΄λ™ν•©λ‹ˆλ‹€.
  • setLocationTrackingMode: (mode: number) => void: μœ„μΉ˜ 좔적 λͺ¨λ“œλ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • setLayerGroupEnabled: (group: LayerGroup, enabled: boolean) => void: λ ˆμ΄μ–΄ 그룹의 ν™œμ„±ν™” μ—¬λΆ€λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • showsMyLocationButton: (show: boolean) => void: λ‚΄ μœ„μΉ˜ λ²„νŠΌμ˜ ν‘œμ‹œ μ—¬λΆ€λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
  • handleOnCameraChange: (event: React.SyntheticEvent<{}, { latitude: number; longitude: number; zoom: number; }>) => void: 카메라 λ³€κ²½ 이벀트λ₯Ό μ²˜λ¦¬ν•˜λŠ” ν•Έλ“€λŸ¬ ν•¨μˆ˜μž…λ‹ˆλ‹€.
  • handleOnMapClick: (event: React.SyntheticEvent<{}, { x: number; y: number; latitude: number; longitude: number; }>) => void: 지도 클릭 이벀트λ₯Ό μ²˜λ¦¬ν•˜λŠ” ν•Έλ“€λŸ¬ ν•¨μˆ˜μž…λ‹ˆλ‹€.
interface NaverMapViewProps {
    center?: Coord & {
        zoom?: number;
        tilt?: number;
        bearing?: number;
    };
    tilt?: number;
    bearing?: number;
    mapPadding?: Rect;
    logoMargin?: Rect;
    logoGravity?: Gravity;
    onInitialized?: Function;
    onCameraChange?: (event: {
        latitude: number;
        longitude: number;
        zoom: number;
        contentsRegion: [Coord, Coord, Coord, Coord, Coord]; // <https://navermaps.github.io/android-map-sdk/reference/com/naver/maps/map/NaverMap.html#getContentRegion()>
        coveringRegion: [Coord, Coord, Coord, Coord, Coord];
    }) => void;
    onMapClick?: (event: {
        x: number;
        y: number;
        latitude: number;
        longitude: number;
    }) => void;
    onTouch?: () => void;
    showsMyLocationButton?: boolean;
    compass?: boolean;
    scaleBar?: boolean;
    zoomControl?: boolean;
    mapType?: MapType;
    minZoomLevel?: number;
    maxZoomLevel?: number;
    buildingHeight?: number;
    nightMode?: boolean;
    scrollGesturesEnabled?: boolean;
    zoomGesturesEnabled?: boolean;
    tiltGesturesEnabled?: boolean;
    rotateGesturesEnabled?: boolean;
    stopGesturesEnabled?: boolean;
    useTextureView?: boolean; // android only
}
/// component method
animateToCoordinate: (coord: Coord) => void;
animateToTwoCoordinates: (c1: Coord, c2: Coord) => void;
animateToCoordinates: (coords: Coord[], bounds?: {
    top: number;
    bottom: number;
    left: number;
    right: number;
}) => void;
animateToRegion: (region: Region) => void;
setLocationTrackingMode: (mode: number) => void;
setLayerGroupEnabled: (group: LayerGroup, enabled: boolean) => void;
showsMyLocationButton: (show: boolean) => void;
handleOnCameraChange: (event: React.SyntheticEvent<{}, {
    latitude: number;
    longitude: number;
    zoom: number;
}>) => void;
handleOnMapClick: (event: React.SyntheticEvent<{}, {
    x: number;
    y: number;
    latitude: number;
    longitude: number;
}>) => void;

Marker

  • coordinate (ν•„μˆ˜): 마컀의 μ’Œν‘œλ₯Ό λ‚˜νƒ€λ‚΄λŠ” Coord νƒ€μž…μž…λ‹ˆλ‹€.
  • anchor: 마컀 μ΄λ―Έμ§€μ˜ 액컀 μ’Œν‘œλ₯Ό λ‚˜νƒ€λ‚΄λŠ” { x: number, y: number } νƒ€μž…μž…λ‹ˆλ‹€.
  • pinColor: 마컀의 ν•€ 색상을 λ‚˜νƒ€λ‚΄λŠ” λ¬Έμžμ—΄μž…λ‹ˆλ‹€.
  • alpha: 마컀의 투λͺ…도λ₯Ό λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
  • rotation: 마컀의 νšŒμ „ 각도λ₯Ό λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
  • flat: 마컀 이미지λ₯Ό ν‰λ©΄μœΌλ‘œ ν‘œμ‹œν• μ§€ μ—¬λΆ€λ₯Ό λ‚˜νƒ€λ‚΄λŠ” λΆ€μšΈ κ°’μž…λ‹ˆλ‹€.
  • image: 마컀둜 μ‚¬μš©ν•  이미지λ₯Ό λ‚˜νƒ€λ‚΄λŠ” ImageSourcePropType νƒ€μž…μž…λ‹ˆλ‹€.
  • onClick: 마컀λ₯Ό ν΄λ¦­ν–ˆμ„ λ•Œ 호좜될 콜백 ν•¨μˆ˜μž…λ‹ˆλ‹€.
  • width: 마컀 μ΄λ―Έμ§€μ˜ λ„ˆλΉ„λ₯Ό λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
  • height: 마컀 μ΄λ―Έμ§€μ˜ 높이λ₯Ό λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
  • angle: 마컀 μ΄λ―Έμ§€μ˜ νšŒμ „ 각도λ₯Ό λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
  • hidden: 마컀λ₯Ό μˆ¨κΈΈμ§€ μ—¬λΆ€λ₯Ό λ‚˜νƒ€λ‚΄λŠ” λΆ€μšΈ κ°’μž…λ‹ˆλ‹€.
  • zIndex: 마컀의 μŒ“μ΄λŠ” μˆœμ„œλ₯Ό λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
  • iconPerspectiveEnabled: 마컀 μ•„μ΄μ½˜μ˜ 원근 효과 μ‚¬μš© μ—¬λΆ€λ₯Ό λ‚˜νƒ€λ‚΄λŠ” λΆ€μšΈ κ°’μž…λ‹ˆλ‹€.
  • isHideCollidedSymbols: μΆ©λŒν•˜λŠ” 심볼을 μˆ¨κΈΈμ§€ μ—¬λΆ€λ₯Ό λ‚˜νƒ€λ‚΄λŠ” λΆ€μšΈ κ°’μž…λ‹ˆλ‹€.
  • isHideCollidedMarkers: μΆ©λŒν•˜λŠ” 마컀λ₯Ό μˆ¨κΈΈμ§€ μ—¬λΆ€λ₯Ό λ‚˜νƒ€λ‚΄λŠ” λΆ€μšΈ κ°’μž…λ‹ˆλ‹€.
  • isHideCollidedCaptions: μΆ©λŒν•˜λŠ” μΊ‘μ…˜μ„ μˆ¨κΈΈμ§€ μ—¬λΆ€λ₯Ό λ‚˜νƒ€λ‚΄λŠ” λΆ€μšΈ κ°’μž…λ‹ˆλ‹€.
  • isForceShowIcon: μ•„μ΄μ½˜μ„ κ°•μ œλ‘œ ν‘œμ‹œν• μ§€ μ—¬λΆ€λ₯Ό λ‚˜νƒ€λ‚΄λŠ” λΆ€μšΈ κ°’μž…λ‹ˆλ‹€.
  • caption: λ§ˆμ»€μ— ν‘œμ‹œλ  μΊ‘μ…˜μ— κ΄€λ ¨λœ 속성듀을 μ •μ˜ν•˜λŠ” κ°μ²΄μž…λ‹ˆλ‹€. 속성은 λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€:
    • text: μΊ‘μ…˜μ— ν‘œμ‹œλ  ν…μŠ€νŠΈμž…λ‹ˆλ‹€.
    • align: μΊ‘μ…˜μ˜ μ •λ ¬ 방법을 λ‚˜νƒ€λ‚΄λŠ” Align νƒ€μž…μž…λ‹ˆλ‹€.
    • textSize: μΊ‘μ…˜μ˜ ν…μŠ€νŠΈ 크기λ₯Ό λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
    • color: μΊ‘μ…˜μ˜ ν…μŠ€νŠΈ 색상을 λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
    • haloColor: μΊ‘μ…˜μ˜ ν…μŠ€νŠΈ 주변에 ν‘œμ‹œλ  효과 색상을 λ‚˜νƒ€λ‚΄λŠ” λ¬Έμžμ—΄μž…λ‹ˆλ‹€.
    • offset: μΊ‘μ…˜μ˜ μœ„μΉ˜λ₯Ό μ‘°μ •ν•˜κΈ° μœ„ν•œ μ˜€ν”„μ…‹ 값을 λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
    • requestedWidth: μΊ‘μ…˜μ˜ μš”μ²­λœ λ„ˆλΉ„λ₯Ό λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
    • minZoom: μΊ‘μ…˜μ„ ν‘œμ‹œν•  μ΅œμ†Œ 쀌 λ ˆλ²¨μ„ λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
    • maxZoom: μΊ‘μ…˜μ„ ν‘œμ‹œν•  μ΅œλŒ€ 쀌 λ ˆλ²¨μ„ λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
    • subCaption: λ§ˆμ»€μ— ν‘œμ‹œλ  보쑰 μΊ‘μ…˜μ— κ΄€λ ¨λœ 속성듀을 μ •μ˜ν•˜λŠ” κ°μ²΄μž…λ‹ˆλ‹€. 속성은 λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€:
      • text: 보쑰 μΊ‘μ…˜μ— ν‘œμ‹œλ  ν…μŠ€νŠΈμž…λ‹ˆλ‹€.
      • textSize: 보쑰 μΊ‘μ…˜μ˜ ν…μŠ€νŠΈ 크기λ₯Ό λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
      • color: 보쑰 μΊ‘μ…˜μ˜ ν…μŠ€νŠΈ 색상을 λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
      • haloColor: 보쑰 μΊ‘μ…˜μ˜ ν…μŠ€νŠΈ 주변에 ν‘œμ‹œλ  효과 색상을 λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
      • requestedWidth: 보쑰 μΊ‘μ…˜μ˜ μš”μ²­λœ λ„ˆλΉ„λ₯Ό λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
      • minZoom: 보쑰 μΊ‘μ…˜μ„ ν‘œμ‹œν•  μ΅œμ†Œ 쀌 λ ˆλ²¨μ„ λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€.
      • maxZoom: 보쑰 μΊ‘μ…˜μ„ ν‘œμ‹œν•  μ΅œλŒ€ 쀌 λ ˆλ²¨μ„ λ‚˜νƒ€λ‚΄λŠ” μˆ«μžμž…λ‹ˆλ‹€
interface MarkerProps {
  coordinate: Coord;
  anchor?: { x: number; y: number };
  pinColor?: string;
  alpha?: number;
  rotation?: number;
  flat?: boolean;
  image?: ImageSourcePropType;
  onClick?: () => void;
  width?: number;
  height?: number;
  angle?: number;
  hidden?: boolean;
  zIndex?: number;
  iconPerspectiveEnabled?: boolean;
  isHideCollidedSymbols?: boolean;
  isHideCollidedMarkers?: boolean;
  isHideCollidedCaptions?: boolean;
  isForceShowIcon?: boolean;
  caption?: {
    text?: string;
    align?: Align;
    textSize?: number;
    color?: string;
    haloColor?: string;
    offset?: number;
    requestedWidth?: number;
    minZoom?: number;
    maxZoom?: number;
  };
  subCaption?: {
    text?: string;
    textSize?: number;
    color?: number;
    haloColor?: number;
    requestedWidth?: number;
    minZoom?: number;
    maxZoom?: number;
  };
}

μ•ˆλ“œλ‘œμ΄λ“œ ν”Œλž«νΌμ—μ„œ λ§ˆμ»€λ‚΄ μ»€μŠ€ν…€ λ·°λ₯Ό μ§€μ›ν•©λ‹ˆλ‹€. 0.0.57

<Marker coordinate={P5} width={96} height={96}>
  <View style=>
    <View
      style=
    >
      <Image
        source={require("./marker.png")}
        style=
        fadeDuration={0}
      />
      <Text>Image</Text>
    </View>
    <ImageBackground
      source={require("./marker.png")}
      style=
    >
      <Text>image background</Text>
    </ImageBackground>
  </View>
</Marker>

Polyline

  • coordinates: Coord[]: μ„ μ˜ μ’Œν‘œ 배열을 λ‚˜νƒ€λƒ…λ‹ˆλ‹€.
  • strokeWidth?: number: μ„ μ˜ λ„ˆλΉ„λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • strokeColor?: string: μ„ μ˜ 색상을 μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • onClick?: () => void: 클릭 이벀트 처리λ₯Ό μœ„ν•œ 콜백 ν•¨μˆ˜λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
interface PolylineProps {
  coordinates: Coord[];
  strokeWidth?: number;
  strokeColor?: string;
  onClick?: () => void;
}

Path

  • coordinates: Coord[]: 경둜의 μ’Œν‘œ 배열을 λ‚˜νƒ€λƒ…λ‹ˆλ‹€.
  • width?: number: 경둜의 λ„ˆλΉ„λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • color?: string: 경둜의 색상을 μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • outlineWidth?: number: 경둜의 μ™Έκ³½μ„  λ„ˆλΉ„λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • passedColor?: string: 경둜의 ν†΅κ³Όλœ λΆ€λΆ„μ˜ 색상을 μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • outlineColor?: string: 경둜의 μ™Έκ³½μ„  색상을 μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • passedOutlineColor?: string: 경둜의 ν†΅κ³Όλœ λΆ€λΆ„μ˜ μ™Έκ³½μ„  색상을 μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • pattern?: ImageSourcePropType: κ²½λ‘œμ— μ‚¬μš©ν•  νŒ¨ν„΄ 이미지λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • patternInterval?: number: νŒ¨ν„΄ μ΄λ―Έμ§€μ˜ 간격을 μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • onClick?: () => void: 클릭 이벀트 처리λ₯Ό μœ„ν•œ 콜백 ν•¨μˆ˜λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
interface PathProps {
  coordinates: Coord[];
  width?: number;
  color?: string;
  outlineWidth?: number;
  passedColor?: string;
  outlineColor?: string;
  passedOutlineColor?: string;
  pattern?: ImageSourcePropType;
  patternInterval?: number;
  onClick?: () => void;
}

Circle

  • coordinate: Coord[]: μ›μ˜ 쀑심 μ’Œν‘œλ₯Ό λ‚˜νƒ€λ‚΄λŠ” λ°°μ—΄μž…λ‹ˆλ‹€.
  • radius?: number: μ›μ˜ λ°˜μ§€λ¦„μ„ μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • color?: string: μ›μ˜ 색상을 μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • outlineWidth?: number: μ›μ˜ μ™Έκ³½μ„  λ„ˆλΉ„λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • outlineColor?: string: μ›μ˜ μ™Έκ³½μ„  색상을 μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • zIndex?: number: μ›μ˜ Z 인덱슀λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • onClick?: () => void: 클릭 이벀트 처리λ₯Ό μœ„ν•œ 콜백 ν•¨μˆ˜λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
export interface CircleProps {
  coordinate: Coord[];
  radius?: number;
  color?: string;
  outlineWidth?: number;
  outlineColor?: string;
  zIndex?: number;
  onClick?: () => void;
}

Polygon

  • coordinate: Coord[]: λ‹€κ°ν˜•μ˜ μ’Œν‘œλ₯Ό λ‚˜νƒ€λ‚΄λŠ” λ°°μ—΄μž…λ‹ˆλ‹€.
  • outlineWidth?: number: λ‹€κ°ν˜•μ˜ μ™Έκ³½μ„  λ„ˆλΉ„λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • outlineColor?: string: λ‹€κ°ν˜•μ˜ μ™Έκ³½μ„  색상을 μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • color?: string: λ‹€κ°ν˜•μ˜ 색상을 μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
  • holes?: Coord[][]: λ‹€κ°ν˜• 내뢀에 μžˆλŠ” ꡬ멍의 μ’Œν‘œλ₯Ό λ‚˜νƒ€λ‚΄λŠ” λ°°μ—΄μž…λ‹ˆλ‹€. (선택적)
  • onClick?: () => void: 클릭 이벀트 처리λ₯Ό μœ„ν•œ 콜백 ν•¨μˆ˜λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€. (선택적)
export interface PolygonProps {
  coordinate: Coord[];
  outlineWidth?: number;
  outlineColor?: string;
  color?: string;
  holes?: Coord[][];
  onClick?: () => void;
}

LayerGroup

  • LAYER_GROUP_BUILDING = "building": 건물 λ ˆμ΄μ–΄ 그룹을 λ‚˜νƒ€λ‚΄λŠ” μƒμˆ˜μž…λ‹ˆλ‹€.
  • LAYER_GROUP_TRANSIT = "transit": λŒ€μ€‘κ΅ν†΅ λ ˆμ΄μ–΄ 그룹을 λ‚˜νƒ€λ‚΄λŠ” μƒμˆ˜μž…λ‹ˆλ‹€.
  • LAYER_GROUP_BICYCLE = "bike": μžμ „κ±° λ ˆμ΄μ–΄ 그룹을 λ‚˜νƒ€λ‚΄λŠ” μƒμˆ˜μž…λ‹ˆλ‹€.
  • LAYER_GROUP_TRAFFIC = "ctt": ꡐ톡 정보 λ ˆμ΄μ–΄ 그룹을 λ‚˜νƒ€λ‚΄λŠ” μƒμˆ˜μž…λ‹ˆλ‹€.
  • LAYER_GROUP_CADASTRAL = "landparcel": 토지 맀핑 λ ˆμ΄μ–΄ 그룹을 λ‚˜νƒ€λ‚΄λŠ” μƒμˆ˜μž…λ‹ˆλ‹€.
  • LAYER_GROUP_MOUNTAIN = "mountain": μ‚° λ ˆμ΄μ–΄ 그룹을 λ‚˜νƒ€λ‚΄λŠ” μƒμˆ˜μž…λ‹ˆλ‹€.
export declare enum LayerGroup {
  LAYER_GROUP_BUILDING = "building",
  LAYER_GROUP_TRANSIT = "transit",
  LAYER_GROUP_BICYCLE = "bike",
  LAYER_GROUP_TRAFFIC = "ctt",
  LAYER_GROUP_CADASTRAL = "landparcel",
  LAYER_GROUP_MOUNTAIN = "mountain",
}

μ°Έκ³ 

  • react-navigation의 μŠ€νƒ 슀크린 μ‚¬μš©μ‹œ μ•ˆλ“œλ‘œμ΄λ“œμ—μ„œ 맡뷰가 겹쳐 λ³΄μ΄λŠ” ν˜„μƒμ΄ μžˆμ„ 경우 useTextureView μ˜΅μ…˜μ„ μΆ”κ°€ν•΄ μ£Όμ„Έμš”.
  • μ•ˆλ“œλ‘œμ΄λ“œμ—μ„œ ScrollView 내뢀에 μΆ”κ°€ν•  경우 scrollGesturesEnabledλ₯Ό μ΄μš©ν•΄ 맡 μŠ€ν¬λ‘€μ„ μ œμ–΄ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
  • 마컀 ν΄λŸ¬μŠ€ν„°λ§μ— ν•„μš”ν•œ 지도 컨텐츠 μ˜μ—­μ€ onCameraChange 이벀트λ₯Ό 톡해 얻을 수 μžˆμŠ΅λ‹ˆλ‹€.