react-native-geocoder-reborn icon indicating copy to clipboard operation
react-native-geocoder-reborn copied to clipboard

Error: Native Error: Geocoder returned an empty list.

Open muhammadashariabdillah24 opened this issue 1 year ago • 0 comments

I get this error when run in IOS

IOS version = 16.4 React version = 17.0.2 React Native version = 0.68.2

And this my code

const getNearsetAgent = arr => { const newArray = [];

arr.map(async el => {
  const address = `${el.ALAMAT}, ${el.Kelurahan}, ${el.Kecamatan}, ${el.Kota}, ${el.Propinsi}, ${el.Kodepos}`;
  const currentCoords = await RNGeocoder.geocodeAddress(address)
    .then(res => {
      const [data] = res;
      return data.position;
    })

  if (currentCoords) {
    el.latitude = currentCoords.lat;
    el.longitude = currentCoords.lng;
    newArray.push(el);
  }

  
});

setCurrentEntitiesLocWithCoords(newArray); };

please help me @timwangdev