• Hi Tijmen,

    I am sometimes seeing a difference between the distances shown when using the store locator and the distance Google gives once you click the ‘directions’ link in the store listing. As an example, on the store locator, the distance from the store to the postcode pin shows as 9 mi, but when I click ‘directions’ and the route is displayed on google maps, the distance shows as 14 mi.

    Also, the store locator doesn’t appear to use the zip/post code at all when calculating the long/lat coordinates. It appears to just use the street and city address. This works reasonably well some of the time, but if a store has an address that doesn’t use a street address for the first address line (e.g. a building name rather than street address), the co-ordinates are often a few meters/mile away from the actual location.

    I am using the latest version, 2.1.1, of WP Store Locator and had to convert hundreds of stores to posts a few months ago when the plugin changed the method of storing, and perhaps this has something to do with that (I haven’t noticed before though).

    Any ideas?

    Thanks,
    Matt

    https://www.ads-software.com/plugins/wp-store-locator/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    The plugin itself takes the start coordinates and the store coordinates and calculates the distance between them. This is a straight line, and doesn’t account for actual roads ( there is no good way to do this different without making tons of extra requests to the maps API ). The directions you see on Google maps do follow actual roads, and because of that will be a bit different.

    The Geocode API doesn’t always now what you want when you search for zipcodes. If you would include the state or so behind it, then you probably get more accurate results.

    You can try it here Just fill in the zipcode behind address=, and if it’s the wrong location try to include the state / city.

    What zipcodes did you search for?

    Thread Starter meanster99

    (@meanster99)

    Hi Tijmen.

    That info clears up the discrepancies between the distances reported on the locator and the ones on google maps. Thanks.

    For the postcodes issue, I’m actually referring to when you ‘add new store’ and enter the address details under ‘store details’. The red asterisks clearly show that the pin location will be based upon the ‘address’, ‘city’ and ‘county/state’. Is there any easy method of ensuring the pin location (on the ‘store map’ on the sidebar of the ‘add new store’ page) also takes into account the zip/postcode?

    We deal with many stores that may be within another building, so the first ‘Address’ part may be a building name, rather than a street address (i.e. ‘Somerset House’, rather than ‘1234 Main Road’), which will often mean the locator doesn’t pinpoint the location correctly. Other than ignoring the bulding name and putting the street adddress in the first address box, is there any way around this?

    Thanks,
    Matt

    Plugin Author Tijmen Smit

    (@tijmensmit)

    The zip code is included in the geocode request if it exists.

    Can you share a couple of addresses that are geocoded incorrectly. If you don’t want to share them here, then you can email them to tijmen at wpstorelocator.co?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Distances are different’ is closed to new replies.