Back to Top
The nuts and bolts for
Creative web development
Back to product page

Google Maps Directions Add-on Support

Overview » Questions » Restrict AutoComplete results to current country?[SOLVED]
This topic is locked
Answered

Restrict AutoComplete results to current country?[SOLVED]

John Carter
Newbie



Since: 17 Jun 2001
Posts: 21
Asked 16 Jul 2011 18:49:04

Is there a way to restrict the Auto Complete drop down results to the maps current country?
Example: I am using a google map on a contact page for an American address marker, can I have only North American, actual drivable addresses appear in the drop down?

When the 1st thing that appears is Polish or Finnish addresses, I question the usefulness or the "wow" value of using this.
Regards

Is there a way to restrict the Auto Complete drop down results to the maps current country?
Example: I am using a google map on a contact page for an American address marker, can I have only North American, actual drivable addresses appear in the drop down?

When the 1st thing that appears is Polish or Finnish addresses, I question the usefulness or the "wow" value of using this.
Regards

1 PERSON HAS THIS QUESTION I have this question, too!

Miroslav Zografski
Official Representative



Since: 04 Apr 2008
Posts: 3,522
Replied 18 Jul 2011 09:13:19
0
Hello John,

for now this option is only available through code change by hand. We will consider including Region Localization for next update.

To do this now you need to change the following <script> element included on the page with the map :

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>


to :

<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&region=US">


The region parameter accepts Unicode region subtag identifiers.


John Carter
Newbie



Since: 17 Jun 2001
Posts: 21
Replied 28 Jul 2011 06:43:21
0
Thanks so much for adding region selection to the new update, you guys are great.
Miroslav Zografski
Official Representative



Since: 04 Apr 2008
Posts: 3,522
Replied 28 Jul 2011 10:04:48
0
Hello John,

You are welcome.