Brian Dunning's FileMaker Custom Functions

GoogleMapsbyCoords ( Latitute ; Longitude ; Zoom ; WebViewerObjectName )

Shows embedded Google Map in a webviewer by Lat/Lon coordinates

  Average rating: 4.3 (39 votes) Log in to vote

Yvonne Dutreaux   Yvonne Dutreaux
Cordblood Registry

Share on Facebook Share on Twitter

  Sample input:
GoogleMapsbyCoords ( 37.66395 ; -122.4181 ; 12 ; "web" )
  Sample output:
data:text/html, NavText

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Jeremy Upton uploaded a CF for easy formatting of code for a web viewer showing an embedded Google map that used address information. Here is a modified variation that uses latitude and longitude information if you have it.

I also added a parameter so you can name the web viewer object anything you wish and pass it via the custom function.

Update to add code to center the maps on the coordinates in case the coordinates do not correspond to an address. otherwise the map will center on the nearest city or county seat, which is not always helpful. A green arrow will show your point, the A marker will show the nearest address, city center or county seat, whichever google can determine first.

 

Comments

Emilio Faro   Emilio Faro, Vigo, Spain
Nov 12, 2009
The correct spelling is Latitude, not Latitute.
 
Gary Wallis   Gary Wallis, Milwuakee
Dec 7, 2009
Can this be applied to multiple Lat/Long locations?
 
Nuno Pedrosa   Nuno Pedrosa, Caldas da Rainha
Feb 8, 2010
Hy there:

I'm trying this function and it very usefull.
I'd like to increase the latitude in amounts of 0,0001 in the latitude (for exemple), within a script.
But when i just add that amout in the latitude with a script, the value changed from 37.66395 to 3766395,00001, not the way I intend, because of the point (and i need to use ,). How can i avoid this?

Thanks
 
Jorge Mc Loughlin   Jorge Mc Loughlin, Mexico City
Jun 9, 2013
Hi Yvonne!! This function it´s great!

Sorry for my english, that´s not so good than your function.

I´m a Filemaker Developer, and I need to print in PDF the map generated with your Fn, but I can´t do it...

I understood that I need to convert the map in an image... ¿Can you help me?

Thank you a lot,

Jorge
 
Shaun   Shaun, LA
Sep 18, 2015
Do you have to comment out all the quotes from <script type= ?
 
João Coutinho   João Coutinho
Jan 10, 2018
I was looking for this simple solution for so long :)
Thanks!
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.