FileMaker Go Location, Part 1: Where Am I?

This is Part 1 in a multi-part series about using the location functions in FileMaker Go.

Posted by  

  1. Where Am I?
  2. What’s Accuracy?
  3. Where’s My Stuff?

In version 12, FileMaker introduced the Location and LocationValues functions for FileMaker Go. I think it’s fantastic that the database in my pocket doesn’t have to ask me where I am. But I don’t see folks using the Location functions in proportion to how awesome they are, so I feel the need to evangelize them.

Location and LocationValues use the various location-sensing techniques built in to iOS devices to tell you where you are. Since FileMaker can only count on iOS devices to have these abilities, the location functions only return a meaningful result in FileMaker Go. The functions both return nothing in FileMaker Pro, Pro Advanced, and in server-executed scripts. Different iOS devices use different methods to get their locations. You don’t have to write your FileMaker calculations or scripts any differently to use the different methods — FileMaker and iOS handle that for you — but the different methods will affect the accuracy of the results you get.

iPod Touches and WiFi-only iPads do not have GPS sensors, so they are limited to using the locations of nearby WiFi base stations to triangulate a position. It’s better than nothing. iPads with cellular data radios and iPhones use Assisted GPS and GLONASS to get a more accurate position.

Location ( accuracy { ; timeout } )

The Location function returns your device’s latitude, longitude, and horizontal accuracy (in meters) separated by commas. (FileMaker’s documentation for the Location function does not mention horizontal accuracy, but it’s there. FileMaker knows about the issue.) FileMaker will try to get a location fix good enough to match the requested accuracy; but if it can’t get a good enough fix within the timeout, the Location function will just give you the best it has so far. Sometimes, Location will even give you a better accuracy than you requested.

Location ( 10 ; 5 ) =
+34.755136, -82.268791, +30.000000    // for example

We usually want to work with latitude, longitude, and accuracy separately. We can parse them out with the MiddleWords function.

 

Parse Location

Location

 

 

More…Location, Part 1: Where Am I?.

Liked Liked
Need FileMaker Development Help? Or to purchase FileMaker Software?
Contact FM Pro Gurus for help