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.
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:
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!
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!