Title: Error with distance function
Last modified: June 23, 2021

---

# Error with distance function

 *  Resolved [manueledelcuoco](https://wordpress.org/support/users/manueledelcuoco/)
 * (@manueledelcuoco)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/error-with-distance-function/)
 * Hi,
 * As you can see from the link that I attached, every store in my website has the
   same distance from an address/city that you write. They spawns all in the same
   point (near Africa), even if the Directions function works well.
 * Also, the zoom functions doesn’t work.
 * From the Google API i activated the following:
 * Directions API
    Distance Matrix API Geocoding API Geolocation API Maps Elevation
   API Maps Embed API Maps JavaScript API Maps SDK for Android Maps SDK for iOS 
   Maps Static API Places API Roads API Street View Static API Time Zone API
 * Can you help me?
 * Thanks,
    Manuele
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-with-distance-function%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Agile Logix](https://wordpress.org/support/users/agilelogix/)
 * (@agilelogix)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/error-with-distance-function/#post-14586825)
 * Hi Manuele, I just checked your URL, all the coordinates values are 0.0 which
   is incorrect.
 * > [Screenshot at 13:59:28.png](https://imgur.com/b7OV9FN)
 * When are you are adding your store address, the form fetches the coordinates 
   using the Google Geocoding API, I can see your geocoding is just fine, please
   make sure the referrer is also correct in the Google console.
 * animalifantasticiecomecurarli.it
    animalifantasticiecomecurarli.it/*
 * Once you make sure the referrer is correct, please go to the Edit store and focus
   on the street or zipcode field, it should fetch the correct values of the coordinates.
 * > [Screenshot at 14:03:21.png](https://imgur.com/IgDCjdd)
 * You can email us at [support@agilelogix.com](https://wordpress.org/support/topic/error-with-distance-function/support@agilelogix.com?output_format=md)
 * Thank you

Viewing 1 replies (of 1 total)

The topic ‘Error with distance function’ is closed to new replies.

 * ![](https://ps.w.org/agile-store-locator/assets/icon-128x128.png?rev=2780478)
 * [Store Locator WordPress](https://wordpress.org/plugins/agile-store-locator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/agile-store-locator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/agile-store-locator/)
 * [Active Topics](https://wordpress.org/support/plugin/agile-store-locator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/agile-store-locator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/agile-store-locator/reviews/)

## Tags

 * [distance](https://wordpress.org/support/topic-tag/distance/)
 * [geocoding](https://wordpress.org/support/topic-tag/geocoding/)

 * 1 reply
 * 2 participants
 * Last reply from: [Agile Logix](https://wordpress.org/support/users/agilelogix/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/error-with-distance-function/#post-14586825)
 * Status: resolved