Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google map autocomplete - maximum 3 character type

I have implemented Google map with search box in it which allows user to select address by searching it.

In that search box, even if I am typing 1 character it searches.. I want user to type at least 3 characters else it should not go for search.

My JS Fiddle is: http://jsfiddle.net/upsidown/2NhsE/

How can I do this? Is Google provides that restriction?

like image 330
k-s Avatar asked Dec 05 '25 05:12

k-s


1 Answers

Google doesn't provide this option for places autocomplete element at the moment.

There is a feature requests in the public issue tracker. Have a look at issue 5831. The issue's status is Accepted, however there is no any ETA exposed. You can star this issue to add your vote and receive further updates.

Also there is a comment #15 with recommendation how to implement this using autocomplete service.


Update: 04 June 2018

This feature was marked as Won't Fix (Obsolete)

This feature request is obsoleted by the new session-based billing for Places autocomplete. Please refer to the "Place Autocomplete" section of https://cloud.google.com/maps-platform/user-guide/pricing-changes/ for more details.

like image 158
xomena Avatar answered Dec 07 '25 18:12

xomena



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!