小编jan*_*jan的帖子

是否可以将自己的“左”“右”“上”“下”按钮用于 react-native-maps?

我用react-native-mapsreact-native,我愿意用我自己的按钮“左”“右”,“向上”和“向下”,而不是用手指轻扫。(也是一个旋转按钮)

我在网上搜索了很多,但找不到解决方案。


我可以使用 setInterval 并在经度或纬度上添加一个数字,但这是/非常数据密集,速度慢且不太流畅。

<MapView style={{ flex: 1 }}
                    initialRegion={this.state.region}
                    followUserLocation={false}
                    showsUserLocation={false}
                    zoomEnabled={false}
                    zoomControlEnabled={false}
                    zoomTapEnabled={false}
                    rotateEnabled={false}
                    scrollEnabled={false}
                  ></MapView>
<Button title="up" onPress... />
<Button title="down" onPress.../>
<Button title="left" onPress... />
<Button title="right onPress... />
<Button title="rotate-left" onPress... />
<Button title="rotate-right" onPress... />
Run Code Online (Sandbox Code Playgroud)

react-native react-native-maps

6
推荐指数
1
解决办法
281
查看次数

标签 统计

react-native ×1

react-native-maps ×1