Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs react-native应用程序的react-native映射中的initialRegion函数_Reactjs_React Native_React Native Android_React Native Ios_React Native Maps - Fatal编程技术网

Reactjs react-native应用程序的react-native映射中的initialRegion函数

Reactjs react-native应用程序的react-native映射中的initialRegion函数,reactjs,react-native,react-native-android,react-native-ios,react-native-maps,Reactjs,React Native,React Native Android,React Native Ios,React Native Maps,我已经为initialRegion创建了一个函数,我想根据所选位置给出纬度和经度 <MapView mapType={'standard'} scrollEnabled={true} zoomControlEnabled={true} zoomEnabled={true} style={styles.map} initialRegion={getLocation} > 但我得到了一个错误: Error while updating p

我已经为initialRegion创建了一个函数,我想根据所选位置给出纬度和经度

<MapView
    mapType={'standard'}
    scrollEnabled={true}
    zoomControlEnabled={true}
    zoomEnabled={true}
    style={styles.map}
    initialRegion={getLocation}
>
但我得到了一个错误:

Error while updating property 'initialRegion' of a view managed by: AIRMap
java.lang.Boolean cannot be cast to com.facebook.react.bridge.ReadableMap
我不知道我做错了什么。请帮帮我

Error while updating property 'initialRegion' of a view managed by: AIRMap
java.lang.Boolean cannot be cast to com.facebook.react.bridge.ReadableMap