By Chihuahua1606 on Wednesday, 10 June 2015
Replies 3
Likes 0
Views 8.5K
Votes 0
Hi

I would like to limit google maps autocomplete to UK address only,

I have came across this.
https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete?csw=1
https://developers.google.com/maps/documentation/geocoding/#ComponentFiltering


If possible, I wonder
1. what files I need to modify for easysocial?
2.code change can be something simple as it is below or modify geocode?
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false®ion=UK";>

If you know where to look or previous example, please let me know?
I would like it to apply the rule to any maps within my site.

Many thanks

H
Hi Shimizu,

I am sorry for the delay of this reply.

You can try to navigate to /media/com_easysocial/scripts/apps/fields/user/address/map.js to learn and modify the behavior of the autocomplete retrieving. The following variable is responsible for the detect location,
'{detectButton}'    : '[data-location-detect]',


Hope these help
·
Wednesday, 10 June 2015 18:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi

I have managed to specify UK, but now I would also like to add two islands called "Jersey" & "Guernsey" in English Channel as well.

Could you please let me know how to add it on top of UK only setting?

Many thanks
·
Tuesday, 22 December 2015 06:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

I am really sorry but unfortunately EasySocial does not have such functionality right now. You will need to customize the codes in the file /media/com_easysocial/fields/user/address/maps.js

The links that you have provided are for Google Places and since EasySocial uses Gmaps, you should be referring to their API here, https://developers.google.com/maps/documentation/geocoding/intro

P/S: Kindly please do take note that customizations are beyond the scope of our support as outlined on our support policy at http://stackideas.com/support
·
Tuesday, 22 December 2015 12:21
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post