react-native-maps显示空白地图

时间:2018-07-12 09:14:52

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

我将在地图上显示我的当前位置,它会显示正确的地图,但是当我将经纬度更改为其他国家或地区时,它将显示空白地图。

constructor(props) {
    super(props);

    this.state = {
        location: {
            latitude: 22.22969011,
            longitude: 79.866,
            latitudeDelta: 0.0922,
            longitudeDelta: 0.0922 * (width / height),
        },
        MarkerTitle: '',
        MarkerDesc: ''
    };
}

<MapView
                provider={MapView.PROVIDER_GOOGLE}
                mapType='standard'
                style={styles.map}
                scrollEnabled={true}
                zoomEnabled={true}
                region={this.state.location}
            >

                <MapView.Marker
                    title={this.state.MarkerTitle}
                    description={this.state.MarkerDesc}
                    coordinate={this.state.location}
                />

            </MapView>

0 个答案:

没有答案