Look at the contact sample again, in the web viewer the custom function Getmap is used to get the map. 14 is the Zoom level that is passed to the custom function. You could use a variable in place of the 14 so you could setup buttons to zoom in and out of the map.
I created a custom function to get the driving directinons, it is not as clean as the Map in a web viewer but it works.
You need Filemaker Advance to create custom functions:
here is the function I created
saddress = Substitute (
saddress1 & " " &
saddress2 & " " &
scity & " " &
sstate & " " &
spostalCode & " " &
" " ; "+"
daddress = Substitute (
daddress1 & " " &
daddress2 & " " &
dcity & " " &
dstate & " " &
dpostalCode & " " &
" " ; "+"
size = GetLayoutObjectAttribute ( webViewerName ; "width" ) & "x" & GetLayoutObjectAttribute ( webViewerName ; "height" )
The custom web address you use in the 2nd web viewer
GetDirections( "Map2" ;sAddress1;saddress2;sCity;sState;sZip;sCountry ; dAddress1 ; dAddress2 ; dCity; dState ; dZip; dCountry )
Note Map2 is the name of the 2nd web viewer
I greatly appreciate your taking time to respond. Sorry about being ignorant in coding and programming....
But exactly from which line to which line of the code you have suggested above needs to be pasted in the code window. And does this code go right under the existing default code that starts as "GetMap...." OR, does the existing code need to be deleted completely and replaced with this one?
Also, I noticed that there is a tiny little button next to the Address 1 line to it's far right side. If I press that, a new Google Maps window opens and there I can get all the functionalities such as zoom, in/out and directions, etc. I am not sure what if there is another use to the default Map window that is provided in the starter solution template.
You need to create a new function GetDirection and a second WebViewer with GetDirection. You will have two webviewers, one with a map displaying the location , then a second webviewer will display the Directions. In the second webviewer you will use GetDirection inplace of the default custom web address.