flutter_geocoder icon indicating copy to clipboard operation
flutter_geocoder copied to clipboard

Getting address size 0 with google method

Open deepakrana0011 opened this issue 5 years ago • 4 comments

Hi i am using this:

var addresses=await Geocoder.google("APIKEYHERE",language: "en").findAddressesFromCoordinates(coordinates)".

But it always return "addresses" variable size "0".

Can you please help me out why address is not getting return.

deepakrana0011 avatar Nov 08 '19 07:11 deepakrana0011

I got the same issue when using an API key that was restricted with an application restriction for an Android/iOS app, but it started to work when switching to a key with no application restriction.

deckerst avatar Nov 21 '19 00:11 deckerst

Thanks @deckerst ! Did it fix it for you @deepakrana0011 ?

aloisdeniel avatar Nov 22 '19 08:11 aloisdeniel

@aloisdeniel yes it get fix for me also . Thank you

deepakrana0011 avatar Nov 27 '19 05:11 deepakrana0011

Hi Guys! I was facing the same issue. When I switch Application Restrictions to "none" it works fine. But when I switch it back to Android/iOS the function always returns an empty array. I'm using the same API key for calling places API and it works perfectly "fine" with Application Restrictions set to Android/iOS. I've created a pull request fixing this issue here I've tested and it works perfectly fine.

tehsunnliu avatar Jun 19 '21 09:06 tehsunnliu