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

244
Views
La propiedad 'coordinate.longitude' está marcada como requerida en 'MapMarker', pero su valor no está definido

Mientras trabajaba en mi proyecto de graduación, tuve algunos problemas con expo/react native mapView, y me da este error. Así que, por favor, ¿alguien puede ayudarme lo antes posible?

Aquí está mi código si quieres comprobar:

 import React, { Component } from "react"; import { View, I18nManager, StyleSheet, } from 'react-native'; import MapView, { Marker } from 'react-native-maps'; I18nManager.allowRTL(false); export default class MyMapView extends Component { //default state constructor(props) { super(props); } render() { return ( <View style={styles.container}> <MapView style={styles.map} region={{ //we have muliple locations so we pass them here latitude: this.props.latitude,longitude: this.props.longitude, latitudeDelta:this.props.latitudeDelta , longitudeDelta: this.props.longitudeDelta, }} > <Marker coordinate={{ latitude: this.props.latitude,longitude: this.props.longitude}} /> </MapView> </View> ); } } const styles = StyleSheet.create({ container: { ...StyleSheet.absoluteFillObject }, map: { ...StyleSheet.absoluteFillObject } });

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Creo que debería agregar una condición para asegurarse de que sus accesorios no estén vacíos. Prueba algo como esto:

 export default class MyMapView extends Component { ... render() { return ( { this.props && <View style={styles.container}> <MapView style={styles.map} region={{ //we have muliple locations so we pass them here latitude: this.props.latitude,longitude: this.props.longitude, latitudeDelta:this.props.latitudeDelta , longitudeDelta: this.props.longitudeDelta, }} > <Marker coordinate={{ latitude: this.props.latitude,longitude: this.props.longitude}} /> </MapView> </View> } ); } }
about 4 years ago · Juan Pablo Isaza Report
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!