【问题标题】:React Native Maps Google Directions ToolbarReact Native Maps Google 路线工具栏
【发布时间】:2022-06-22 04:22:32
【问题描述】:

当我点击 Android 中显示的标记方向工具栏时,我使用的是 React 原生地图(Google 地图),但该工具栏未在 iOS 中显示。

有什么方法可以在 iOS 中显示这个。

<MapView 
                    style={{ flex: 1 }}
                    initialRegion={{
                        latitude: lat,
                        longitude: lon,
                        latitudeDelta: 0.0922,
                        longitudeDelta: 0.0421,
                    }}
                    minZoomLevel={16}
                    provider='google'
                >
                    <MapView.Marker 
                        coordinate={{
                            latitude: lat,
                            longitude: lon
                        }}
                        title={address}
                    >
                        <Image resizeMode={'contain'} source={{ uri: markerIconUrl }} size={'xs'} alt={address} />
                    </MapView.Marker>
                </MapView>

【问题讨论】:

    标签: javascript reactjs react-native react-native-maps


    【解决方案1】:

    根据文档,显然它在 iOS 上不可用:

    https://github.com/react-native-maps/react-native-maps/blob/master/docs/mapview.md

    “Android only If false 将在标记按下时隐藏'导航'和'在地图中打开'按钮”

    但我也有兴趣找到解决方案。

    【讨论】:

      猜你喜欢
      • 2019-07-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-08
      相关资源
      最近更新 更多