Jump to content

Code to set for GeoMaps for a specific country (au)


Chris Gurney

Recommended Posts

Hi

 

Before the latest update for geomaps in geomaps.js I had set

 

var o = {

types: ['geocode']

,componentRestrictions: {country: 'au'}

};

 

if(self.options.autocomplete === true) {

 

and that has been working fine.

 

In latest version  code has changed so I guessed this would work but it didn't.

 

var o = {

types: ['geocode']

};

 

if(jreviews.geomaps.autocomplete_country !== 'au') {

o.componentRestrictions = {country: jreviews.geomaps.autocomplete_country};

}

 

if(self.options.autocomplete === true) {

 

Can you assist please.

 

Thanks

Chris

 

 

Link to comment
×
×
  • Create New...