我正在尝试解决红色边框问题react-native-maps
。我已经尝试了所有通常的样式设置、重新安装/重新链接以及将空中地图添加到我的 xcode 项目中,我不想使用谷歌地图。任何帮助将不胜感激。
import React, { Component } from 'react';
import {
Dimensions,
StyleSheet,
View,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const styles = StyleSheet.create({
container: {
...StyleSheet.absoluteFillObject,
justifyContent: 'flex-end',
alignItems: 'center',
},
map: {
...StyleSheet.absoluteFillObject,
width: width,
height: height,
},
});
export default class Map extends Component {
render(){
const { container, map } = styles;
return(
<View style={container}>
<MapView
style={map}
initialRegion={{
latitude: 37.78825,
longitude: -122.4324,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
}}
showUserLocation
/>
</View>
);
}
};