Software tips, techniques, and news.

By Sam Gallagher  Posted on  December 29th, 2021  in  Free Downloads, Claris FileMaker

FileMaker Google Maps Polygon Integration

Google offers a plethora of APIs to integrate different Maps features in custom solutions, including polygons. In Google Maps, a polygon defines a series of connected coordinates, forming a closed loop. They can be used to define the boundaries of a lake, city, or forest, for example, and can be useful to show the distribution of features in different regions on the map. In this article, we'll discuss how to use the Google Maps JavaScript API polygons feature to display locations and regions on a virtual map embedded in your FileMaker solution. 

API Setup

Getting your API key is free and easy, and the first step is to create a project in the Google Developers Console if you don't already have one.

Google Developer Console Dashboard

Once you have created the project, you will then need to enable the Google Maps JavaScript API and then set up the credentials for the API. Once you have an API key, paste it into the example FileMaker solution.

Google Maps JavaScript API
Google Maps Menu Credentials
Google Maps Create Credentials

Storing and Restoring Polygons

A FileMaker record needs to be created for each polygon drawn on the map. This allows the polygon to be recreated when the map is refreshed or used on a different layout in the FileMaker solution. To achieve this, we take the properties of the polygon object and send them to FileMaker using the FileMaker.PerformScript() function. This logic is contained in a listener function that runs when the user has completed drawing a polygon on the map.

Storing and Restoring Polygons

We use a handler script in FileMaker to take the polygon properties and create a FileMaker record and assign those properties to a field.

Storing Polygons

We need a script and JavaScript function to restore polygons that are stored in FileMaker. The FileMaker script creates a list of polygon properties through a cartesian relationship and calls an associated function using the Perform Javascript in Web Viewer script step.

Perform Javascript in Web Viewer script step

Finally, the JavaScript function takes the list of polygon properties and adds them to the map.

Adding Polygon Properties to Map


Using Google Maps polygons in conjunction with your FileMaker solutions enables you to display useful and dynamic geographical information with simple FileMaker scripts and a few lines of code. If you have any questions or want to discuss a Google Maps integration in your FileMaker solution, please contact DB Services.

Did you know we are an authorized reseller for Claris FileMaker Licensing?
Contact us to discuss upgrading your Claris FileMaker software.

Download the FileMaker Google Maps Polygon Integration File
Please complete the form below to download your FREE FileMaker file.
FileMaker Experience *
Terms of Use *
OPT-IN: I agree that I am downloading a completely free FileMaker application file with no strings attached. This file is unlocked, and I may use it for my business or organization as I see fit. Because I am downloading a free file, I agree that I should receive occasional marketing. I understand that I can OPT-OUT of these emails at anytime.
Sam Gallagher thumbnail
Sam Gallagher

Sam is a friendly and energetic application developer who is motivated by producing high-quality results for customers. His ability to easily converse with anyone and his dedication to contributing to his team’s success make him a valuable asset to fellow team members and customers alike.

FileMaker 18 Certified Developer
FileMaker 17 Certified Developer
FileMaker 16 Certified Developer
FileMaker 15 Certified Developer
FileMaker 14 Certified Developer
FileMaker 13 Certified Developer
FileMaker 12 Certified Developer
FileMaker 11 Certified Developer
"We were actually able to add more features than we thought would be possible within our budget. We always experienced a ‘can do’ attitude and DB Services was incredibly patient and easy to work with."
Courtney Hartman
Art Director
"The new FileMaker custom website interface is very user-friendly and easy to follow for our clients. In addition, it is much faster than the old Instant Web Publishing (IWP) interface. Thank you and all the others who have helped us out at DB Services. I am very grateful for the excellent service you provide us. Its nice to know we can call you for help if we have an issue."
Wayne Capek
"We needed a solution that would simplify the administration of our responsibilities under our contract with the State of Indiana. We have seen a dramatic increase across the state in the number of potential foster and adoptive parents that have begun the preparation and training process. This increase has resulted in a significant opportunity for children available for adoption. That’s a big win for everyone! And it’s all because we can refer potential parents to the proper state contacts efficiently and quickly."
Chris Morrison
Executive Director
"Thank you for all of your expertise and valuable help. I am so grateful to have found DB Services."
Linda Findlay
"Thank you for our new database system. We transitioned from a carbon copy paper based system to a digital database. The software has saved us time and money. We used to archive all our jobs in cabinets, now we can look up a job in seconds from anywhere. The software allows us to easily email estimates to our customers in pdf format. In a year there was a return on investment just from eliminating the purchasing of our carbon forms."
Todd Cartmel
"The new system allows us to create and track jobs for customers along with inventory, something we had been doing with separate word and spreadsheet files. Because it’s now so intuitive, new staff members are able to begin using the database immediately without our usual training session and ‘cheat sheets’ for getting around within the file."
Tom Andrews