Skip to content

Repository files navigation

基于reactnative的AMap:3D实现

AMap:props

属性说明类型默认值
locationEnabled显示自身位置boolfalse
locationRepresentationStylelocationRepresentationStyleboolfalse
indoorMapVisible显示室内地图boolfalse
trafficVisible显示路况boolfalse

props:locationRepresentationStyle

字段名说明类型默认值
showsAccuracyRing精度圈是否显示boolfalse
showsHeadingIndicator是否显示方向指示booltrue
fillColor精度圈 填充颜色string
strokeColor精度圈 填充颜色string
lineWidth精度圈 边线宽度number0
enablePulseAnnimation内部蓝色圆点是否使用律动效果booltrue
locationDotBgColor定位点背景色string#fff
locationDotFillColor定位点蓝色圆点颜色stringblue
image定位图标srcstring

Marker:props

属性说明类型默认值
title点击标注显示的titlestring
subTitle点击标注显示的subTitlestringfalse

ios

  1. 在 AppDelegate.m 文件中引入所需头文件
#import<AMapFoundationKit/AMapFoundationKit.h>
  1. 在 AppDelegate.m 文件的 didFinishLaunchingWithOptions 方法中配置高德 Key
  2. 将ios/AMapView拖进项目中
  3. 在js中引入原生组件
import{requireNativeComponent}from'react-native';constAMap=requireNativeComponent('AMapView',null);

说明

学习原生代码,造rn组件轮子...

About

amap for reactnative

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages