Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Public Forum / Main Forum / Limiter l'autocomplete de GMap à la France

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

× OLD Forum post could be checked here : forum.joomprod.com

Limiter l'autocomplete de GMap à la France

More
12 years 3 weeks ago #7337 by Siteprod
Bonjour,
NB je n'ai pas renouveller mon abonnemenet Gold et j'ai la version 2.9.13 Gold

Est-il possible de limiter l'autocomplète à un seul pays, es la France?
en commençant à entrer le code postal par ex je voudrais que cela commence à donner que ceux de la France

Merci
Sid
Merci
Sid
The following user(s) said Thank You: adarr
More
12 years 3 weeks ago #7364 by loic
Bonjour,

D'après l'api Google, c'est possible.

Ouvrez le fichier 'images/com_adsmanager/plugins/gmap/plug.php' et ajoutez ce code à la ligne 171 (c'est une ligne vide):
var options = {
  componentRestrictions: {country: "fr"}
 };

Le code pays pour la France n'est peut être pas celui-ci, il vous faudra chercher le bon si erreur il y a.

Ensuite, remplacer la ligne 173:
var autocomplete = new google.maps.places.Autocomplete(input);

Par celle-ci:
var autocomplete = new google.maps.places.Autocomplete(input,options);

Et voici le lien ou j'ai trouvé le renseignement:
stackoverflow.com/questions/8282026/how-...ity-and-country-only

Cordialement.
The following user(s) said Thank You: adarr
More
11 years 2 months ago #13529 by marron
Replied by marron on topic Limiter l'autocomplete de GMap à la France
bonjour,
j'ai testé ce code mais ça ne marche pas. y a t il une autre solution??

Merci
The following user(s) said Thank You: adarr
More
11 years 2 months ago #13544 by tompap
Replied by tompap on topic Limiter l'autocomplete de GMap à la France
A première vue c'est le bon code,
avez-vous regarder la console javascript pour les erreurs
après il s'agit d'un developpement sur mesure.

Si vous voulez que l'on fasse le code pour vous, vous pouvez nous contacter par email pour avoir un devis pour ce développement à rajouter comme option au champ gmap, le développement ne devrait pas être très cher.
The following user(s) said Thank You: adarr, marron
Moderators: perry
Time to create page: 0.072 seconds
Powered by Kunena Forum