As of November 2022, the Internet Explorer browser is no longer supported by the Google Maps API. If you are using FileMaker 18 the Map Widget may not work correctly, as the FM18 web viewer on Windows uses IE. Upgrading to FileMaker 19 should solve this issue.
Quickly and easily implement Google's mapping technology in your Claris FileMaker solution, including the ability to call back to FileMaker and utilize the Google cluster functionality. The Map Widget is a FileMaker add-on file accessed from your solution by copying two scripts and modifying them for your data. A typical implementation can take a surprisingly small amount of time. Please note, your location data must include latitude and longitude to integrate with the Google API. Google provides tools for assigning this data to your location records. The Map Widget includes scripts for 'Geo-Coding' your location data in this way. Download Map Widget Demo
1. Backup your solution files in case you want to start over, or encounter any problems when implementing the Map Widget. 2. Put the PBS_Widget and PBS Demo - Maps Widget files on the server where it will be hosted and open the files in FileMaker Server. Once you're all finished with these instructions, you can remove the Demo file if you wish, but it really helps to be there for copying and pasting scripts with references intact. 3. If you won't be hosting with FileMaker Server, place the files in the same folder as your solution.
1. Import (or copy) the Map Widget scripts to your solution from the PBS Demo - Maps Widget file (the two scripts in the Map Widget folder of the demo file). The user name for the demo file is 'admin' and the password is 'admin'. You will get a couple of errors that we'll fix in the next few steps. FileMaker will create an external data source for the widget file. 2. If you plan to host the widget file on a server other than where your solution is hosted, you will need to edit this reference to point to the file on that host.
Update the Map_Widget script for you solution. 1. Create a button in your solution where you would like to call the map from and call the Map_Widget script from that button. Please see the demo file included with the Map Widget for an example on the Contact Detail screen, upper left hand corner.
2. Locate the sections of code between the ###### symbols as shown in the screen captures below. 3. The first section allows you to put scripting for finding the found set you wish to be mapped. If you want to map the current found set, simply comment out lines 46 and 47.
4. Open the Set Variable script steps and replace the fields with fields from your solution. Please note the following:
The comments in the script provide further instructions.Now, edit the MapWidgetGotoRecord script for your solution. 5. Change line 25 to reference the layout you would like the user to go to when the click the More Info link in the Google popup dialog. 6. Change line 29 to reference your primary key field (note that the variable name should not be modified)
Modify the privilege groups of the users who will interact with the Map Widget so that they have the ability to use FMP URLs enabled. This is done in the Manage Security dialog as shown below.
When you click on the callback URL in the Google popup dialog, the copy of FileMaker Pro on your computer will be opened with that URL. If you have multiple copies and versions of FileMaker Pro installed, the version you expect may not launch. Generally, the copy of FileMaker Pro defined as the 'default' for the .fmp12 file suffix will launch. For this reason, behavior can seem incorrect or unpredictable when multiple different copies of FileMaker are installed. If you have a desire to run the PBS Widget file on a different server than the one your solution is hosted on, you will need to edit line 37 of the Map_Widget script as shown below to point the script at the correct server.
Contact us to discuss your custom solution. To get started on a quote, fill out and submit our new project inquiry form.
"*" indicates required fields