• Hello! Trying to get a grip on this great plugin.

    Geolocation of visitor doesn’t work in Google Chrome. I read about it in a thread, and I can live with that. I tried Firefox and it work, but I think I found a bug. If I press the little gray arrow in the map (my place?) Firefox asks me permission to use my location. Fine. Plugin adds my zip code (Swedish) to the location field in the search bar. Fine. I then change the search radius (or number of results) to something and press enter, my place in Sweden is suddenly swapped to a street in South Korea. ?? Interesting, but not what I want.

    Is there a way to Restrict geocode locations to a list or countries? I saw in the documentation
    https://wpstorelocator.co/document/wpsl_geocode_components/
    that you can restrict to a city (or country). Can I add a comma separated list of countries? The Stores are placed in several countries (but not South Korea).

    Best regards

    • This topic was modified 8 years, 5 months ago by Argentum.
Viewing 1 replies (of 1 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    It looks like you can only use a single country.

    It’s not 100% the same ( it does use the same componentRestrictions code ), but Google doesn’t seem to be interested to add support for it.

    Searching locations by zipcode is generally a bad idea, because of the chance you end up in the wrong country. The work around for this problem is setting the map region to Sweden on the settings page, so that will be Googles first choice when it has to geocode a zipcode.

    This of course will not rule out any other issues for people searching for a zipcode from another county. What Google does is that it simply makes a guess what you mean when it knows there are multiple results.

    If you search for “New York”, then it’s easy, but if you enter a zipcode like 1234, which likely exists in multiple countries, then Google has to guess, and this sometimes goes wrong.

Viewing 1 replies (of 1 total)
  • The topic ‘Restrict geocode location to list of countries’ is closed to new replies.