美文网首页工作生活
react-native-amap3d自定义图片

react-native-amap3d自定义图片

作者: 丹丹_ccd5 | 来源:发表于2019-07-01 14:53 被阅读0次
  1. 新建文件夹drawable-xxhdpi
    android/app/src/main/res下新建一个文件夹,命名为drawable-xxhdpi, 将需要的图标放入该文件夹里

    drawable-xxhdpi文件夹
  2. 将Marker的image属性等于该图标名称

<MapView.Marker image='truck' active={true}
    coordinate={{
        latitude: data.lockLatitude,
        longitude: data.lockLongitude,
    }}
>
  1. 重新运行 react-native run-android 就OK了👏

相关文章

网友评论

    本文标题:react-native-amap3d自定义图片

    本文链接:https://www.haomeiwen.com/subject/gmmgcctx.html