Brian Dunning's FileMaker Custom Functions

Google Maps ( Latitude ; Longitude ; Zoom )

Search Location on Google MAPs via coordinates

  Average rating: 4.6 (35 votes) Log in to vote

Robinson Ogberaha   Robinson Ogberaha
MTN Nigeria
http://www.mtnonline.com

Share on Facebook Share on Twitter

  Sample input:
Google Maps ( 6.652006; 1.312619 ; 14)
  Sample output:
https://maps.google.com/maps?q=6.652006,1.312619&z=14&output=embed&iwloc=0

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

It displays a location using coordinates on filemaker webviewer

 

Comments

Bane   Bane, Banatski Brestovac
Nov 20, 2014
This works as a charm. Thanks!
 
Corey   Corey, Tampa FL
Dec 10, 2014
Love your site.

For some reason when I paste this formula, Filemaker wants to identify the word zoom in the formula as a field.

Any thoughts on this?

Filemaker 13 User
 
Robinson Ogberaha   Robinson Ogberaha, Lagos, Nigeria
Dec 10, 2014
Hello Corey,

did you set Zoom as parameter under the customer function window?

you need to set Zoom, Latitude and Longitude as custom functions
 
Robinson Ogberaha   Robinson Ogberaha, Lagos, Nigeria
Dec 10, 2014
Damn sorry for the bad English... stupid iphone keeps autocorrecting my words

Hello Corey,

did you set Zoom as a parameter under the customer function window?

you need to set Zoom, Latitude and Longitude as parameters under the custom functions window
 
Hamid   Hamid, Tehran
Mar 4, 2015
HI,

Even though I sett zoom as a parameter but the script does not work.

What else should I do?

Best regards,
/Hamid
 
Robinson Ogberaha   Robinson Ogberaha, Lagos, Nigeria
Mar 4, 2015
Hello Hamidou, whats the error you are getting and what version of filemaker are you using?

The Google new API uses frames, if that's the error you are getting, use this script.

"data:text/html,
<style type='text/css'>
html,body {
overflow:hidden;
}
</style>
<html>

<iframe
width='295'
height='185'
frameborder='0' style='border:0'
src='https://www.google.com/maps/embed/v1/place?key=YOURGOOGLEAPIKEY&q=" & Latitude &" , "& Longitude & "&zoom=15'

</iframe>
</html>"

where latitude and longitude are varibales.
 
Hamid   Hamid, Tehran
Mar 6, 2015
Hi Robinson,

Thank you very much for prompt reply.
I am using Filemaker Pro advanced 12.1.

When I am using the script, nothing happens and seems it doesn't work .

Does this script work for several coordination as the same time?

Best,
/Hamid
 
ben bates   ben bates, Geelong Australia
Jan 5, 2016
i keep getting this error when using the above iframe code :

The Google Maps API server rejected your request. Invalid request. Missing the 'q' parameter.

and ideas ??

i have a google api "browser key' i have tried Java, static and Map api key all don't seem to get any where.

thanks in advance
 
Jonathan Mickelson   Jonathan Mickelson
Jun 4, 2018
The Google Maps API has changed the url format is now simply:

https://www.google.com/maps/place/1200+Pennsylvania+Ave+SE,+Washington,+DC+20003/
 

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.