Google Distance Matrix API

Google Distance Matix API for calculating dynamic delivery charges has been introduced in Foodomaa from version 2.0

How to enable Google Distance Matrix API?

Steps:

  • Login to your Google Cloud Console and enable the "Distance Matrix API"

  • Login to Foodomaa Admin Panel and enable Distance Matrix API from Admin > Settings > Customer Application > Use Google Distance Matrix API

Important Notes

  • Google Distance Matrix API calculation is only done on the Cart and not for listing the stores on the Homepage. For store listing, we rely on the geographical distance between the customer and the store.

  • Google Distance Matrix API only works when the store is configured for dynamic delivery charges.

  • If the distance between the customer and the store cannot be covered by Driving, Google Distance Matrix API will not return any value for calculations, so in this case, we fall back to the older method of calculation using the Geographical distance between the customer and the store. Example: There is no driving road path between a certain location in NewYork and Brazil, so Google Distance Matrix API doesn't return any data, in such cases, we rely on the Geographical calculations to get the distance between two points.

Last updated