Services Plugins FAQs

Calculating Distance with Map Extender

Using the Map Extender plugin, all I need to do is be able to find the distance in Miles between address A and address B. I don’t need to show it on a map, I just need to be able to input those two addresses and have a text box show the distance.

I have a simple setup with a map and an attribute ID, input fields for both addresses and and a button with workflows. Google cloud is set up with client and server API codes. Screenshots below.

screenshot-bubble.io-2020.06.17-14_49_37

But nothing calculates and I keep getting a “we found a temporary bug, please check back…” error message. I even tried copying the “documentation” module. So, now I’m asking for help.

Hi, @jerrykingglobal!

Thanks for reaching out!

First of all, please duplicate all the plugin’s settings from Demo Page and give it another try.
If you still facing that error then please, provide more details like : browser/OS, steps to reproduce the issue, console.log. screenshots of workflow and settings of the element (“Mile”), which calculates miles.

Thanks for Understanding!
Best, Julia!

I had some configuation/API things that needed tweeking. Got it working now. THanks

I got the plugin to work and spit out the distance and converted it to mileage. But in trying to use that mileage to determine the pricing for services (conditions based on range of distance equal different pricing teirs), I found that bubble cannot determine an actual value of that output. In order make the entire application and automated workflow be of value, I need for bubble to actually register the mileage as a value to set the state and show the proper pricing.

Why does bubble not recognize the distance output as a value?

Hi, @jerrykingglobal!

To better understand this use case and help you could please provide as more details as possible, like workflow screenshot of the “Quote Group” and element “Price for transport: Based on Mileage”. Also, screenshots of the “State price Quote” settings. Please clarify what exactly you are trying to get using the state value and how you calculate the actual price.

Thanks for understanding! :pray:
Best, Julia!

Ok, so…

The Use Case: Generate the total driving distance from Location A to Location B. Then generate a price quote based on the tier that the mileage falls under. For example, a distance between 0 and 400 miles is $250. A distance between 401 and 800 miles is $350. And onward.

Using the Zeroqode Map Extender plugin I am able to get the Distance. Cool.

To get the quote, I have the following workflows set up…

AND I JUST SOLVED IT…

The workflow to set the state tries to use the “Distance # Input Text” when it needs to use OR would just be more efficient to use the “Map Extender plugin value” to generate the actual value.shown below.

Now it is working.

Here are the rest of the settings…

Hi, @jerrykingglobal!

Glad that you managed to solve it! :slightly_smiling_face:
If you like our plugin you can rate it by going to Plugins tab in Bubble editor. Find the plugin by name and it give it as many stars as it deserves :slightly_smiling_face:

The more feedback we get, the more motivated we are to make things better in Bubble. :slightly_smiling_face:

Also if you have any questions, please, let us know!
Best, Julia!

If anyone stumbles upon this question; I was struggling with the same problem and my solution is different:
The issue is that the plugin is sluggish, which means that if you, in a workflow try to:

  1. Get data (for example Distance) from the MapExtender
  2. Store this data in a state
    ---- then it does not work!

what you need to do in the workflow is:

  1. Get data (for example Distance) from the MapExtender
  2. Add a pause… I am using 1000 milliseconds, which works fine
  3. Then you can store the MapExtender data in a state

This solved it for me, good luck!