Skip to content

Error: Native Error: Geocoder returned an empty list. #47

@muhammadashariabdillah24

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions