Brian Dunning's FileMaker Custom Functions

GoogleMap ( Zoom ; Width ; Height ; Mcolor ; Msize ; p1 ; p2 )

Shows clean google map in webviewer

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

Dick Impens   Dick Impens
MaltaCode
https://maltacode.com

Share on Facebook Share on Twitter

  Sample input:
Let ( [
$a1 = Substitute ( Contacts::Addres1 ; " " ; "+" ) ;
$a2 = Contacts::Town ;
$width = GetAsNumber ( GetLayoutObjectAttribute ( "GMap" ; "width") );
$height = GetAsNumber ( GetLayoutObjectAttribute ( "GMap" ; "height") );
$color = "red";
$markersize = "small"
];
GoogleMap (GMapZoom; $width; $height; $color; $markersize; $a1; $a2)
)
  Sample output:
http://maps.googleapis.com/maps/api/staticmap?zoom=14&size=433x335&markers=color:red|size:small|StreetName,Townname&sensor=false

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

This function creates a 'clean' google map, no route, no satellite, no light mode, no controls. Zoom functions can be created. Most of this code is done by Tom Gellar.

The map will automatically adjust to the window size (Object name of webviewer in this function must be "GMap" so the width and height can be calculated. It is not perfect yet, as google maps API retrain proportions.

I've created two buttons to zoom-in and zoom-out. Values are stored in the numeric field GMapZoom. Default of this field is set to 14 (auto enter). Set this to the size you need to be default.

 

Comments

Omelyan Burtnyk   Omelyan Burtnyk
Mar 13, 2017
Thank you Dick
 
Dick Impens   Dick Impens, MaltaCode
Mar 14, 2017
You're welcome, Omelyan :)
 

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.