GEO my WP Support

Use this forum for technical support and general questions related to GEO my WP plugin and its core add-ons only. For technical support and general questions related to any of the premium extensions please open a new premium support ticket.

[Resolved]Distances not matching with google maps ones.

Home Forums Support Distances not matching with google maps ones.

This topic contains 2 replies, has 2 voices, and was last updated by  Eyal Fitoussi 1 year, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #56329

    antonia scamardella
    Participant

    Hello,
    we have revendor theme and we integrated geomywp plugin to have a store locator as explained here: https://wpsoul.com/how-to-create-multi-vendor-shop-on-wordpress/#store-locator
    we also have synchronized products.
    But we noticed distance of geomywp results are not matching with google maps distance at all.

    Is there a solution for that?
    Thanks a lot

    #56343

    Eyal Fitoussi
    Keymaster

    Hello Antonia,

    I have already replied to your question via email, however, I will post it here as well for others who come across it.

    Unfortunately, What you describe is not possible.

    When doing the proximity search query, the plugin calculates the distance using the Haversine formula. The formula calculate the distance of a straight line between 2 points.

    What you are asking is the driving distance between 2 points. However, driving distance calculation can only be done via mapping services, such as Google map.

    It is possible to calculate the driving distance with custom JavaScript, but only after the query was executed. Which means that the plugin will do the “normal” distance search query first to find the locations, and only then, while the results are being output on the screen, the JavaScript function will calculate the driving distance of each location and inject it into each location in the result. However, calculating the driving distance uses the Google API daily limit and will slow down the page load.

    I hope this info helps.

    #56381

    Eyal Fitoussi
    Keymaster

    This topic marked “Resolved” due to inactivity. If you wish to reply to this topic please change its status to “Not resolved”  before replying.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.