Title: Google maps distance intergration
Last modified: February 19, 2019

---

# Google maps distance intergration

 *  Resolved [3vance](https://wordpress.org/support/users/3vance/)
 * (@3vance)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/google-maps-distance-intergration/)
 * Hi
    I would like to purchase the developer version of Calculated Fields Form 
   because of the Google maps distance module. Is there a tutorial how to add Google
   map distance into the form calculations?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/google-maps-distance-intergration/#post-11221960)
 * Hello [@3vance](https://wordpress.org/support/users/3vance/)
 * Yes of course. Please, visit the following link that includes the description
   of the operations available in the “Distance Module”:
 * [https://cff.dwbooster.com/documentation#distance-module](https://cff.dwbooster.com/documentation#distance-module)
 * [https://cff.dwbooster.com/blog/2018/09/25/misunderstood-operations/#distance](https://cff.dwbooster.com/blog/2018/09/25/misunderstood-operations/#distance)
 * Best regards.
 *  Thread Starter [3vance](https://wordpress.org/support/users/3vance/)
 * (@3vance)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/google-maps-distance-intergration/#post-11222809)
 * Thanks for the response. I have looked at the documentation links you provided
   above. It was a little confusing. Is there a video tutorial showing step by step
   how to use Distance module in a calculated fields form?
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/google-maps-distance-intergration/#post-11222880)
 * Hello [@3vance](https://wordpress.org/support/users/3vance/)
 * The use of this operation is very simple. I’ll try to describe it with a hypothetical
   example: assuming there is two text fields in the form for entering the addresses:
   fieldname1 and fieldname2, and you want get the distance in miles between them,
   you simply should insert a calculated field in the form with the following code
   as its equation:
 *     ```
       DISTANCE(fieldname1, fieldname2, 'mi', 'DRIVING')
       ```
   
 * if you want get the distance in kilometers:
 *     ```
       DISTANCE(fieldname1, fieldname2, 'km', 'DRIVING')
       ```
   
 * As this operation uses the Google APIs to get the distance, it requires that 
   you generate a Google API Key ([https://console.developers.google.com/apis/dashboard](https://console.developers.google.com/apis/dashboard))
   to be used in your website domain, and you pass it to the form.
 * So, if the id of your form is 123, the form’s shortcode would be:
 *     ```
       [CP_CALCULATED_FIELDS id="123" google_api_key="your api key here"]
       ```
   
 * replacing the text: your api key here
    with the API Key you have generated from
   the Google Developer Console.
 * Best regards.
 *  Thread Starter [3vance](https://wordpress.org/support/users/3vance/)
 * (@3vance)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/google-maps-distance-intergration/#post-11225113)
 * I want to create a real-time quotation form for a borehole drilling business.
   
   The drilling business location (Point A) will be the default starting point on
   the map. A website visitor will get a quotation by adding their location (Point
   B) by dragging Point B marker on the map or typing their location (Point B) inside
   a text field. Then the distance from the above will be automatically factored
   in calculations by the form when adding the total cost.
 * Is this possible with Developer version of this plugin?
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/google-maps-distance-intergration/#post-11225977)
 * Hello [@3vance](https://wordpress.org/support/users/3vance/)
 * You are merging different questions here, the DISTANCE operation that estimate
   the distance between two address does not requires a map, simply two directions,
   and if one of direction is fixed (not entered by the user), you should enter 
   it directly in the equation:
 *     ```
       DISTANCE("the address here", fieldname2, 'mi', 'DRIVING')
       ```
   
 * The plugin does not includes a map in the forms, however, you can extend your
   forms as you want, and you can insert a map by yourself using some of code.
 * Another alternative would be the use of the “Google Places add-on” or the “Autocomplete
   Places add-on”, both distributed with the Platinum version of the plugin. They
   transform the input fields for the addresses into autocomplete fields, that suggest
   to the users possibles addresses in the typing process.
 * Best regards.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Google maps distance intergration’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form - AI Form Builder for WordPress - Contact, Payment, Quote, Quiz & More](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/google-maps-distance-intergration/#post-11225977)
 * Status: resolved