I have Latitude and Longitude coordinates as decimals (43.72007, -71.0363) and I would like to display this location on a Google map on a Quickbase form.

  • 1
  • 2
  • Question
  • Updated 3 years ago
  • Answered

I need to know what field type is needed in the QB form, and then, if applicable, what type of formula is necessary to plot these points on the Google Map.

Thank you!

Photo of Matt

Matt

  • 10 Points

Posted 3 years ago

  • 1
  • 2
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Would you be OK with pushing a button to launch the map?
Photo of Matt

Matt

  • 10 Points
Yes. That should be OK.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
So, I don't claim much expertise, here, just googling really

http://stackoverflow.com/questions/2660201/what-parameters-should-i-use-in-a-google-maps-url-to-go-t...


So you could try a URL formula button set to open in a new window (checkbox) 

"http://maps.google.com?q=" & list(",",trim([Lat]),trim([Long]))
Photo of Matt

Matt

  • 10 Points
Mark, thanks for your help with this. One more question. I cannot figure out the syntax. Using your formula, QB responds with the following error message: "There are extra characters beyond the end of the formula."  The error message highlights everything in the formula past the comma in the expression "List(","......"

Any idea in how to fix this? Thanks in advance!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Can you post your current actual formula please?
Photo of Matt

Matt

  • 10 Points
Here it is:   "https://maps.google.com?q= & List("," , Trim([Latitude]), Trim([Longitude]))"

I've tried various combinations of parenthesis to no avail. QB seems to be stuck on the inclusion of the quotation mark in the List formula.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
I think that the formula I originally posted was correct.
Yours should  be corrected to be

"https://maps.google.com?q="  & List("," , Trim([Latitude]), Trim([Longitude]))
Photo of Matt

Matt

  • 10 Points
Thanks Mark. Your formula worked... I discovered that I had to change the field type from Numeric to Text for the Lat & Long values. It successfully places the pin on a google map. Appreciate your help & patience
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Great, thx for letting me know it works.
Photo of Natalya

Natalya

  • 50 Points
Good morning everyone!

Another feature that  you can do natively without coding, is to put the latitude in the Street 1 field and the longitude in the Street 2 field. This will populate the location on the Google Map.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Thx for that Tip!
Photo of Matt

Matt

  • 10 Points
Thanks! This is working very well for me now.
Photo of Matt

Matt

  • 10 Points
Thanks Natalya for the tip! I tried this and while the map does display a location after entering the Lat/Long in Address fields 1 & 2, the location displayed in QB is not the same location for which I obtained the coordinates.

Example: I googled the lat/long for the Sears Tower in downtown Chicago (41.878868, -87.635936) and google maps places a pin a little outside Wilmington, NC.

Am I doing something wrong?  Thanks!!
Photo of Natalya

Natalya

  • 50 Points
Hey Matt! You want to make sure that in the address field, nothing else is filled in. For instance, making sure Country is not set to any value. I would try this in a new record first, and when you hit save, it should show the correct location.
Photo of Matt

Matt

  • 10 Points
Interesting! It looks like you have to save the record before Google will render the correct location. Thanks for the tip! I'll pass it along to my co-workers.