Я хотел бы использовать карты OpenStreetMap на Android , но это не работает, я получаю белую карту Google .
Ниже Код, который я использую, я не поместил ключ Google API , потому что он мне не понадобится.
Я прочитал это: https://github.com/react- Native-Maps/React-Native-Maps/Проблемы/3747
Но нет решения. >
import React from 'react';
import {StyleSheet, View, Text} from 'react-native';
import MapView, {UrlTile, PROVIDER_DEFAULT, MAP_TYPES} from 'react-native-maps';
type TextContainerProps = {
showText: boolean;
};
type MapContainerProps = {
showMap: boolean;
};
const TextContainer: React.FC = ({showText}) => {
if (!showText) return null;
return Map;
};
const MapContainer: React.FC = ({showMap}) => {
if (!showMap) return null;
return (
);
};
const App: React.FC = () => {
return (
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
text: {
textAlign: 'center',
margin: 10,
fontSize: 18,
fontWeight: 'bold',
color: '#fff',
},
mapContainer: {
flex: 1,
margin: 10,
borderRadius: 10,
overflow: 'hidden',
},
map: {
flex: 1,
//...StyleSheet.absoluteFillObject,
},
});
export default App;
< /code>
Подробнее здесь: https://stackoverflow.com/questions/793 ... eetmap-map