SeedCode can now customize your ProMaps solution so you can run your maps in FileMaker WebDirect.
ProMaps doesn’t work in WebDirect by default, but KC Embrey and Jason Young have figured out how to customize it to create a seamless user experience. Check out this short video showing ProMaps running in WebDrect: notice how it can call FileMaker scripts in WebDirect and pass found sets between WebDirect layouts and the map. We’re thrilled with how this turned out!
Add This to Your File
If you’d like to run your copy of ProMaps in WebDirect, it’s a pretty complex modification. The description below meant to show advanced developers what we’re doing with WebDirect and how they can replicate that or extend it. Unfortunately, it’s not intended to be a step-by-step guide for getting your copy of ProMaps running in WebDirect. That’s not something we can describe in a blog post, but it is something we can set up for you if you’reinterested.
If you’re a developer fluent in custom web publishing or the new Data API, read on, and we’ll describe how we’ve set this up. If you need more guidance than that, we’re happy to get you an estimate and set this up for you: once it’s up and running, you can customize it like regular ProMaps. Please get in touch.
Maps in FileMaker WebDirect – Why Is This So Hard?
Until now, the problem has been that it’s tough to call scripts in a WebDirect session from inside a web viewer in the same session. If you ask your web viewer to run a FileMaker script by URL, for example, WebDirect will ask you to log in again and start a second WebDirect session, run your start-up scripts, etc. This is a terrible user experience. WebDirect has no support for tokens or deep linking which make this kind of thing simple in most web apps: once you’re logged into Google Apps, for example, you can open a document by URL without having to log in again.
Users run into this any time the map takes you to a FileMaker layout or runs a FileMaker script. When you click on a button to view a property record in your own layout, or when you perform a find in FileMaker and then as the map to show the found set: these kinds of action require communication between the web viewer and the WebDirect session. And this communication is not built into WebDirect.
Using a Session Table. KC and Jason figured out that on-timer triggers in WebDirect could call scripts seamlessly: the trick would be telling the on-timer to run a different script depending on what the user asked to do. So they created a session table in ProMaps which has one record for every logged in user. Now when you click a button in ProMaps that would typically run a script, ProMaps instead sends the name of the script to your record in that session table. An on-timer script in ProMaps queries your session record to see if there are any scripts it needs to execute and when it finds one, it runs that script along with any parameters.
But how does the WebViewer write to your record in the session table if the whole problem is that the WebViewer can’t call FileMaker scripts without spinning up a new session? Instead of editing your session record with a script, ProMaps uses the web publishing gateway or the Data API to edit your session record. In our deployments, we use fmxj.
If you’re interested in using fmxj in your own projects, here are some resources:
Note: the “drop a pin” example in this video is not a stock ProMaps feature–KC added that for a customer and wanted to show that it also worked in WebDirect. All the other functions shown in the video are built into ProMaps. If you’d like your map to do something fancy, just get in touch.
I would like to know how this is to set up for us?
We are a fire department
Running the map in WebDirect is customized for each site. Please send a note to [email protected] and we’ll set up a screenshare to chat about your setup.