Location - reverse geocoding accuracy

Please provide the following:

  1. SDK Version: “expo”: “^34.0.1”,
  2. Platforms(web/all):

Hello, I am trying to set a marker on a click on maps on store the address at this marker.
Marker works fine but the Location.reverseGeocodeAsync(coords) returns me address objects which only have {city, region, country, postalCode}, What should I do to get precise address?

Here is the code I call onClick on the map :

 _attemptReverseGeocodeAsync = async (coords) => {
    try {
      let result = await Location.reverseGeocodeAsync(coords);
      return result;
    } catch (e) {
      return e;
    }
  };

  onPress = (position) => {
    const coords = {latitude:position.latLng.lat(), longitude:position.latLng.lng()};
    console.log("coords", coords);
    this._attemptReverseGeocodeAsync(coords).then(result => {
      console.log(result);
    })
    .catch((error)=> {
      console.log(error);
    })

Permission and google api key are set in component did mount.

ADDITIONNAL INFO :
My sample function comes from this snack, from which the address comes correctly with street name and number

ADDITIONNAL INFO :
The snack uses expo 32.0.0 and imports Location from ‘expo’ (working)
My code uses expo v34.0.1 and imports Location by import * as Location from 'expo-location';
This looks like expo-location does not behave the same way as when Location was imported from ‘expo’ ? i.e, The address object returned by the function does not contain all the values.

Here is the expected return value in Location.d.ts in expo-location :
image

It is supposed to contain a street value but mine don’t …

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.