react-native-geocoder-reborn
react-native-geocoder-reborn copied to clipboard
Problem with making multiple geocode requests
There seems to be a problem when making multiple geocode requests at the same time, where only the first registered request is properly resolved, while the subsequent requests just disappear.
const position = {
lat: 63.096,
lng: 21.61577
};
Geocoder.geocodePosition(position).then(() => {console.log('Pos 1')}).catch(e => console.warn);
Geocoder.geocodePosition(position).then(() => {console.log('Pos 2')}).catch(e => console.warn);
Only the first console.log will fire, and there are no warnings.
This is a known issue on iOS. Please try to avoid multiple calls at the same time.
I will improve this by rejecting the promise properly.