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

Problem with making multiple geocode requests

Open beije opened this issue 6 years ago • 1 comments

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.

beije avatar Oct 18 '19 10:10 beije

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.

timwangdev avatar Oct 26 '19 16:10 timwangdev