Ionic maps autocomplete

My take on google maps autocomplete.

Ionic maps codepen

3 Likes

Hi,

Could you please tell me how to handle error scenario, in above service . Like, if google API return error then how to handle that case.

Hi Rajul,

I’ve updated the code to handle errors from google.

Right now the error is just printed on top f the list, without styling.

If you search for exmaple “JBAJBJBASJFBAOEIFRB”, it will print “There was an error :frowning: ZERO_RESULTS”.

If you want a different text, you would need to map the status from google PlacesServiceStatus API

1 Like

Thanks Froelund :smile: