Where Am I? Using FileMaker Go 12 to track your Location


FileMaker Go 12 has a new mobile function called “Location()”. Location() only works on Mobile devices at this point, so to test this demo file you need to have FileMaker Go 12 installed on your iOS device, an iPhone, iPod or iPad. FileMaker Go is free and available here for the iPhone and here for the iPad.

Once you have one of these apps installed, then click this link in Mobile Safari on your device to download the ‘Where Am I?’ FileMaker 12 Demo file. If you want to download the Demo file on your desktop computer to further dissect scripts in the file, simply right-click the link and select ‘Download linked file’, or transfer it using iTunes.

Downloading the ‘Where Am I?’ Demo file on your iPhone or iPad directly to FileMaker Go 12

wpid1712-wpid-img_77041.png

Tap the ‘Open in “FileMaker Go” button after clicking this link in Mobile Safari.

Blank screen

wpid1716-wpid-img_77261.png

Tap the Show Location button. You will be prompted to allow FileMaker Go to have access to your location information, click “OK” to allow the app to use your location in order to display it on a Google Map.

‘Where Am I?’ Map Loaded

wpid1717-wpid-img_77271.png

If everything is working correctly (you do have a data plan or are connected to a Wi-Fi network right?) your location Longitude and Latitude should be filled in the Point A field and your location should display with a small pin on the Google Map below.

Map loading Directions

wpid1715-wpid-img_77251.png
  1. Next enter a destination in the Point B field
  2. Click the ‘Pt A -> Pt B‘ button
  3. Tap the pin map icon to display a map version

Displaying text directions from Point A to Point B

wpid1714-wpid-img_77241.png

At the top of the Web Viewer with the Google Map in it, you will see an icon for text directions as well.

Displaying a Google route map

wpid1713-wpid-img_77231.png
  1. Tapping the first icon takes you to your starting place, in this case, where you are
  2. The second icon displays layers on the map, options include Satellite imagery, Traffic, Bike routes etc.
  3. The third icon displays a text description of the route between Point A and Point B

‘Where Am I?’ Demo Database running on FileMaker Pro Advanced

wpid1718-wpid-media_13406853133711.png

If you are interested in how this works, have a look at the database file in FileMaker Pro or FileMaker Pro Advanced on your desktop computer. Stretching out the database to the left a little bit and the Web Viewer can display the map properly in the desktop application.

Key scripts in the ‘Where Am I?’ Demo database

wpid1719-wpid-media_13406853339141.png

The Show Location script demonstrating how to use the new mobile-only Location() function.

Show Location script

wpid1720-wpid-media_13406853531311.png

Check out the $Location variable.

New “Location()” function only works on Mobile platforms

wpid1721-wpid-media_13406853715201.png

The nice thing about this Location function is that you don’t need to send it a Web Viewer and parse the result back. Location() is a standalone function and gets the Longitude and Latitude from Apple’s built in GPS services, cellular network, or WiFi.
 
Location (accuracy {; timeout}) Location ( 100; 40 ) takes up to 40 seconds to return the latitude and longitude with an accuracy of 100 meters. I haven’t tried tweaking the numbers given in the reference guide, (100 feet and 40 seconds) as they seemed to give good results.

More details on the Location() function is here.

If you read through the rest of the script, all it does is send this Longitude and Latitude data back at Google Maps using a Web Viewer to display your location.

Point A to Point B script – calculated Google URL to create directions on a Map

wpid1722-wpid-media_13406854106081.png

The second script is similar to the first, except the Location variable is combined with a Point B address to display directions. The calculated URL is displayed above.

Extra Credit: Application ideas

media_1340693556018.png

Photo Credit: Flickr Creative Commons: nauright

Some ideas of what one might use the Location function in a FileMaker Go application:

  • An application of this might be to record the location whenever a photograph, perhaps for insurance claims, is taken with the iPhone’s camera from within FileMaker Go.
  • Another idea would be to add a New Record step to the script, allowing one to create digital ‘bread crumbs’ of a series of locations as one is walking or driving around to track a delivery or merchandising system.
  • Creating a looping script that performs the Location function every five minutes while FileMaker Go is running to generate a map of where one has been.

LocationValues() Function

wpid1724-wpid-media_13406920490001.png

Photo Credit: Flick Creative Commons: rupertuk

Another new Mobile only function is LocationValues (accuracy {; timeout}).

This function returns altitude and horizontal accuracy. The values come back as Return delimited values, listed below which can be parsed using the GetValue function.

  • latitude
  • longitude
  • altitude
  • horizontal accuracy (+/- accuracy in meters
  • vertical accuracy (+/- accuracy in meters)
  • age of value in minutes (0.2 would represent 0.2 minutes or 12 seconds ago)

A mountain climbing tracking app perhaps?

2014-01-28 Update: For an awesome and detailed look at the Location function in FileMaker Go, I encourage you to go have a look at what Jeremy Bante from the Scarpetta Group has done with this. He has blogged an incredible six part article on cool things you can do with the FileMaker Go Location function. Even better, he includes a very nice demo file that illustrates everything in detail. A must read if you are interested in this topic.

Related Articles:
Simple Static Map Overlays in FileMaker Pro
Creating Google Cluster Maps from FileMaker
FileMaker and Image Maps in a Web Viewer

Advertisements

11 Responses to “Where Am I? Using FileMaker Go 12 to track your Location”

  1. Peter Barfield March 21, 2013 at 9:26 pm

    love the ideas and particularly the article very well written.Being fairly new to filemaker though how would you envisage doing the looping script every five minutes to generate a map of where one has been and I assume this could be sent to a new record where say an administrator somewhere who has filemaker pro connected to filemaker server could view and perhaps print out a track of where say an employee has been. (just an example).

Trackbacks/Pingbacks

  1. Making FileMaker interact with Google Translate | HomeBase Software - July 13, 2012

    […] Articles: Getting Help about FileMaker – FAST! Where Am I? Using FileMaker Go 12 to track your Location Creating Google Cluster Maps from FileMaker Creating and Storing 2D […]

  2. Creating Google Cluster Maps from FileMaker | HomeBase Software - July 13, 2012

    […] Articles: Simple Static Map Overlays in FileMaker Pro Where Am I? Using FileMaker Go 12 to track your Location FileMaker and Image Maps in a Web Viewer Share […]

  3. Getting FileMaker Go databases onto an iOS device using Dropbox | HomeBase Software - July 14, 2012

    […] Articles: Where Am I? Using FileMaker Go 12 to track your Location “FileMaker Go” demonstrates Apple’s double standard on Flash ‘FileMaker Go for the […]

  4. FileMaker and Image Maps in a Web Viewer | HomeBase Software - July 14, 2012

    […] Articles: Simple Static Map Overlays in FileMaker Pro Creating Google Cluster Maps from FileMaker Where Am I? Using FileMaker Go 12 to track your Location Share this:EmailTwitterFacebookPrintStumbleUponRedditLinkedInDiggLike this:LikeBe the first to […]

  5. FileMaker Progress Indicators using a Web Viewer and Animated GIFs | HomeBase Software - July 14, 2012

    […] Articles: Where Am I? Using FileMaker Go 12 to track your Location Making FileMaker interact with Google Translate Creating Google Cluster Maps […]

  6. ‘FileMaker Go for the iPhone’ – a First Look | HomeBase Software - July 14, 2012

    […] Articles: Where Am I? Using FileMaker Go 12 to track your Location Getting FileMaker Go databases onto an iOS device using Dropbox “FileMaker Go” demonstrates […]

  7. 99 Bottles of Beer – in FileMaker 11 | HomeBase Software - July 14, 2012

    […] Articles: Where Am I? Using FileMaker Go 12 to track your Location Changing Window Names based on User Input FileMaker Progress Indicators using a Web Viewer […]

  8. Database Development with FileMaker Pro Advanced on a tablet | HomeBase Software - July 14, 2012

    […] Where Am I? Using FileMaker Go 12 to track your Location Using FileMaker 12 Runtime files with FileMaker Go 12 Getting FileMaker Go databases onto an iOS device using Dropbox […]

  9. Filemaker Go Locations – Location, Part 5: Which Way | FileMaker News - December 26, 2013

    […] a user interface to display the results by just opening Google’s directions in a web viewer, as Douglas Alder described. But other folks have already invested a lot of work into building apps specifically designed for […]

%d bloggers like this: