Earthquakes, JSON, and Automation in FileMaker Maps

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!

Featured Posts

Follow Along

Stay up to date with the latest news & examples from SeedCode

1 Comment

  • 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 *

Check out some of our other posts ...

Suggesting Appointment Slots

Show Available Slots that Match Multiple Criteria Schedulers often look for gaps in their schedules to find the open resources for each opportunity. But sometimes,

Introducing Draft Settings Mode

Following up on this idea that people stretch themselves when they feel a little safer, we’ve been very focused on the customization experience for DayBack

New Longer Timescales for DayBack

Resource Scheduling Swimlanes You can now extend the pivoted scheduling view in DayBack to show items by week instead of solely by day. This lets

FileMaker Summer Camp – Recap

Unconference Sessions If you missed Pause in October, here’s a look at the sessions that attendees hosted. All the sessions are listed in this post

COMPANY

FOLLOW ALONG

Stay up to date with the latest news & examples from SeedCode

© 2024 SeedCode, Inc.