1.0.7 • Published 2 months ago

react-native-zr-map v1.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

react-native-zr-map

Getting started

$ npm install react-native-zr-map --save

Manual installation

iOS

Android

//在AndroidManifest.xml文件里的application标签里添加

<meta-data
                android:name="com.amap.api.v2.apikey"
                android:value="${AMAP_APPKEY}"/>

//在 app/build.gradle 里添加

android {
    ...
    defaultConfig {
        ...
        manifestPlaceholders {
            AMAP_APPKEY:"myAppKey"
        }
    }
}

//在 AndroidManifest.xml 里添加
<application
    ...
    android:allowNativeHeapPointerTagging="false"
>

Usage

import { initMap, MapView, MapMarker } from 'react-native-zr-map'

  initMap(Platform.select({
    android: "myAppKey",
    ios: "myAppKey",
  }))

<MapView initialCoordinate={this.state.position} style={{ width:200, height: 200 }}>
    <MapMarker coordinate={this.state.position} title={'标题'} />
</MapView>
1.0.7

2 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago