I am looking for a mean to use OpenStreetMap data in my react native application. During my last reasearches, I found MapLibre, which is free option based on MapBox GL old versions. The matter I am facing is that I am not able to find any plugin to use it in React Native, apart from @react-native-mapbox-gl/maps. Therefore, in their documentation it is said: "We also support MapLibre flavors of Mapbox SDKs now", but the example they proposed is the following:
import { StyleSheet, View } from "react-native";
import MapboxGL from "@react-native-mapbox-gl/maps";
MapboxGL.setAccessToken("<YOUR_ACCESSTOKEN>");
const styles = StyleSheet.create({
page: {
flex: 1,
justifyContent: "center",
alignItems: "center",
backgroundColor: "#F5FCFF"
},
container: {
height: 300,
width: 300,
backgroundColor: "tomato"
},
map: {
flex: 1
}
});
export default class App extends Component {
render() {
return (
<View style={styles.page}>
<View style={styles.container}>
<MapboxGL.MapView style={styles.map} />
</View>
</View>
);
}
}
It is required to have an access token for MapBox GL and there is not a description for MapLibre Otherwise, if there is a free tile provider you can advise me, it will be welcome.