【问题标题】:Rotate Overlay in react-native-maps在 react-native-maps 中旋转覆盖
【发布时间】:2021-05-30 14:51:13
【问题描述】:

有什么方法可以旋转react-native-maps 中的Overlay 组件吗? 我尝试使用 bearing 道具。但似乎道具不可用。也尝试使用 style 道具进行旋转。也没有用

<Overlay
            image={IMAGE_URL}
            style={{transform: [{ rotate: '90 deg' }]}}   // not working
            bearing={VALUE}  // not working
            bounds={BOUNDS}
            location={LOCATION}
            anchor={[0.5, 0.5]}
            width={WIDTH}
            height={WIDTH}
          />

【问题讨论】:

    标签: react-native google-maps react-native-maps


    【解决方案1】:

    我找到了解决方案。从 master 分支安装 react-native-maps 库。在 master 分支中,Overlay 组件具有 bearing 属性。使用下面的命令

    npm install https://github.com/react-native-maps/react-native-maps.git#master --save

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-12-15
      • 1970-01-01
      • 2023-03-23
      • 1970-01-01
      • 2019-07-08
      • 2015-08-18
      • 2023-02-08
      相关资源
      最近更新 更多