0
Well I am in the exhaustive attempt to get the React-Native-Maps and finally, to serve it, I made the code (for now simple):
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { MapView } from 'react-native-maps';
export default class App extends Component {
render(){
return (
<View>
<MapView
initialRegion={{
latitude:-22.792051897174755,
longitude:-43.29683600367076,
}}
style={styles.mapView}
>
</MapView>
</View>
);
}
}
const styles = StyleSheet.create({
mapView: {
position: 'absolute',
top: '0',
left: '0',
bottom:'0',
},
});
However, when serving in the web version, and in the mobile version (android) the console shows me the following message:
Typeerror: Cannot read Property 'style' of Undefined Module.../.. /.. /.. /.. /.. /.. /.. /.. /Desktop/Ej/toolsNative/node_modules/React-Native-maps/lib/Components/Mapview.js C:/Users//Desktop/Ej/toolsNative/node_modules/React-Native-maps/lib/Components/Mapview.js:84
It also highlights this part of the code:
style: viewPropTypes.style,
I don’t know what else to do, I would be very grateful if someone would help me (I don’t know if I can attach all the Mapview.js code around here)