MapView onPress无法正常工作反应本机地图

时间:2020-07-02 09:03:55

标签: react-native react-native-ios react-native-maps

我要使用react-native-maps。在android os中可以使用,但是在ios中无法移动google map。同样onPress的{​​{1}}属性不起作用。
我要做的步骤:
1- MapView
2-在ios目录中,我编辑了podfile并添加以下行:

npm install react-native-maps --save

在iOS目录中三运行rn_maps_path = '../node_modules/react-native-maps' pod 'react-native-google-maps', :path => rn_maps_path pod 'GoogleMaps' pod 'Google-Maps-iOS-Utils'
现在,我使用这些代码行添加地图和标记,当用户单击地图时,标记位置应更改。但是地图无法移动,因此onPress属性从未触发。

pod install

出什么问题了?

0 个答案:

没有答案