Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

240
Views
¿Por qué MapView de la exposición no funciona correctamente?

¡Estoy trabajando con la biblioteca MapView de la exposición! como puede ver en el código, todo es lógico, pero sigue diciéndome 'La coordinate.latitude de prop. latitud está marcada como requerida en MapMarker , pero su valor no está undefined ' incluso aunque estoy consolando el registro del evento y muestra que no lo es indefinido

 "action": "press", "coordinate": Object { "latitude": 37.73174790670175, "longitude": -122.47094504535197, }, "position": Object { "x": 352, "y": 307, }, }

y este es mi codigo:

 const MapScreen = ({ navigation }) => { const MapRegion = { latitude: 37.78, longitude: -122.43, latitudeDelta: 0.0922, longitudeDelta: 0.0421, }; const [newCoor, setNewCoor] = useState(); let markerCoordinates; const selectLocationHandler = (event) => { console.log("ana", event.nativeEvent); setNewCoor({ lat: event.nativeEvent.coordinate.latitude, lng: event.nativeEvent.coordinate.longitude, }); console.log(newCoor); }; if (newCoor) { markerCoordinates = { latitude: newCoor.latitude, longitude: newCoor.longitude, }; } const savePickedLocationHandler = () => { if (!newCoor) { return; } navigation.navigate("NewPlaceScreen", { pickedLocation: newCoor }); }; useLayoutEffect(() => { navigation.setOptions({ headerRight: () => ( <TouchableOpacity style={{ marginHorizontal: 20 }} onPress={savePickedLocationHandler} > <Text style={{ fontSize: 19, fontWeight: "bold", color: Platform.OS === "android" ? "#C06E00" : "white", }} > Save </Text> </TouchableOpacity> ), }); }, []); return ( <MapView style={styles.mapImage} region={MapRegion} onPress={selectLocationHandler} > {markerCoordinates && <Marker coordinate={markerCoordinates}></Marker>} </MapView> ); }; const styles = StyleSheet.create({ mapImage: { flex: 1, }, }); export default MapScreen;
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!