Reagieren Sie auf natives Android und verwenden Sie die OpenStreetMap-KarteAndroid

Forum für diejenigen, die für Android programmieren
Guest
 Reagieren Sie auf natives Android und verwenden Sie die OpenStreetMap-Karte

Post by Guest »

Ich möchte OpenStreetMap Karten auf Android verwenden, aber es funktioniert nicht. Ich erhalte eine weiße Google -Karte .
unten ist Der Code, den ich verwende, habe ich keinen Google-API-Schlüssel eingefügt, weil ich ihn nicht brauchen würde. native Maps/React-Native-Maps/Ausgaben/3747
Es wird jedoch keine Lösung geschrieben.
Kann mir jemand helfen?

Code: Select all

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: Select all
























Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post