FileMaker can do a lot more with the Google Maps API than just showing pins on the map and creating routes. This mod of SeedCode’s ProMaps template is a great example: it reacts to earthquake alerts. It visualizes the impact zones for seismic events and reports on the affected properties.

Alan Corkhill at Marx Okubo recently had us put together some significant customizations to their copy of ProMaps, integrating data on seismic events (earthquakes) from ShakeAlert. The ultimate result is that, when data on new seismic activity is received, the data is automatically imported into ProMaps, creating a visual representation of the severity waves from the event and which properties are likely to be affected. FileMaker then creates reports for those properties, including images from ProMaps.

Connecting FileMaker, Google Maps, and Seismic Event JSON

This was quite a broad, challenging project, but the end result is fantastic. Here’s a little more detail on how we accomplished this:

Using Jason Young’s example file for integrating Gmail with FileMaker, a server-side script periodically checks a special mailbox for new alerts. The script scans those emails for seismic event details: specifically, for a link to the full details of the event.

We then use that link to download a JSON file with all of the details of the event and parse the data into FileMaker records. Those records contain “zone” data, which includes:

• Latitude and longitude data for points of a polygon (the impact zones)
• A percentage likelihood that properties in that zone will be affected by this event

With this data, we can load the map with a visual representation of each of these zones.

FileMaker Map Showing Earthquake Data

Next, using Google’s JavaScript API, we determine which properties fall within a zone of the seismic event and send that data back to FileMaker for reporting.

The last step in this process is creating the reports: each needs a picture of the property on the map’s satellite view. The trick here is that this all needs to happen on the server, rather than a FileMaker Pro client. How did we make that happen? We used PhantomJSCloud. PhantomJSCloud is a service that renders a page as if you were viewing it in a browser, then takes a screen-shot and sends that back, all with a simple Insert from URL (CURL) command. This allows us to process the seismic event data, render the map, and take the images for the property reports, all using FileMaker server-side scripts.

Here’s the final result for an example property:

Automatic Earthquake Impact Report from Filemaker

This whole solution has been implemented in a series of small deliveries, and now it’s great to see everything come together like this, up and running in Web Direct. Big thanks to, Alan, for letting us share this work!

Learn more about adding ProMaps to your file

Tagged with →  

One Response to Earthquakes, JSON, and Automation in FileMaker Maps

  1. James Medema says:

    KC,

    Nicely written article (of course) but what an amazing implementation! One of the things I love most about the FileMaker/Claris community is hearing the stories of the problems we are solving for clients. And the crew at SeedCode has been at the forefront of so many of those amazing stories.

    Kudos to all involved and congrats to your client as well!

Leave a Reply

Your email address will not be published. Required fields are marked *

Share →
DOWNLOAD
DayBack Calendar
DayBack's 30-day trial is unlocked so you can customize it and integrate it with your files.
Download DayBack and we'll send you a couple short emails with tips on how to modify it and use some of the coolest features.
Thank you! Please download: DayBack Calendar
Need More?
SeedCode tips & example files in your inbox
Need More?
SeedCode tips & example files in your inbox
Want More?
Be the first to see articles and tips like these
DOWNLOAD
TimeZync
Download TimeZync and we'll send you a couple short emails with tips syncing your FileMaker Go files.
Thank you! Please download: TimeZync
Want More?
Be the first to see articles and tips like these