ionic-team / ionic-native-google-maps

Google maps plugin for Ionic Native
Other
221 stars 125 forks source link

Geocoder returns empty array [] and catches error on android build #216

Closed ramioooz closed 5 years ago

ramioooz commented 5 years ago

Hello developers,

Geocoder works fine on web, but not working in android builds,

Geocoder.geocode({
      position: { lat: 11.62104266, lng: 22.46397197 }
    }).then((results: GeocoderResult[]) => {
      console.log(results);
}).catch(error => {
console.log("geocoder error : ", JSON.stringify(error))});

I am getting empty results array [] I used google dev tools to read error message catched by console log, this is what I got :

{"__zone_symbol__currentTask":{"type":"microTask","state":"notScheduled","source":"Promise.then","zone":"<root>","cancelFn":null,"runCount":0}}

I am using the followings :

Any suggestions, Thank you

wf9a5m75 commented 5 years ago

empty results array [] is the result of Google, not this plugin's bug.

ramioooz commented 5 years ago

Hello @wf9a5m75 , thank you for your fast reply,

the position, i posted up is a dummy co-ordinates, the Geocoder is working just fine in browser, but when running on android It is not . I tested it using the same position.

Thanks

wf9a5m75 commented 5 years ago

Unfortunately, I have no further information. The maps plugin returns just the results.

ramioooz commented 5 years ago

@wf9a5m75 did you try to test Geocoder fetching a position on android build ?

wf9a5m75 commented 5 years ago

No, I'm busy.

ramioooz commented 5 years ago

@wf9a5m75
OK , lets see if someone faced the same issue and solved it.

wf9a5m75 commented 5 years ago

Please try on emulator or other phones by yourself at least.

ramioooz commented 5 years ago

@wf9a5m75 I surely will and post it here..

ramioooz commented 5 years ago

Hello @wf9a5m75

I did some further tests on the app and I noticed that Geocoder works fine on my android device when I connect through vpn.. I think this has something to do with where I live. I live in Africa - Sudan, and some of google api services are not working here...

I will let you know if I found a work around. for now I will close this issue. Thank you