Вы находитесь на странице: 1из 35

FileMaker Developer Conference 2012

Session INT005
Mapping and Geolocation with FileMaker

Thomas Kunetz
FileMaker Inc.

Who am I?
Systems Engineer since 5.5 @ FileMaker
FileMaker Certified Developer 7, 8, 9, 10, 11, 12
Main territories :

France
Italy
Belgium
Netherlands
Africa
Middle-East
Eastern-Europe

Agenda
Geolocation
One Address
Directions
Multiple Addresses

Mapping
FusionMaps
SVG

Conclusion

Geolocation - Single address

Geolocation - Single address


Address
5201 Patrick Henry Drive,Santa Clara, CA 95054, USA

Parsing
http://maps.google.com/maps?q=5201+Patrick+Henry
+Drive,Santa+Clara,+CA+95054,+USA

WebViewer
"http://local.google.com/maps?" & "q=" & /*Address=*/
Database::Street & "," & /*City=*/ Database::City & "," & /
*State=*/ Database::State & "," & /*Zip Code=*/
Database::Zip & "," & /*Country=*/ Database::Country

Geolocation & GPS coordinates


With FileMaker Go
Mobile functions
Location ( accuracy {; timeout} )
LocationValues ( accuracy {; timeout} )

Geolocation & GPS coordinates


With FileMaker Pro
Geocoding
Transforming a physical address to Lat / Lng coordinates

Reverse Geocoding
Transforming Lat / Lng coordinates to a physical address

GoogleMaps Geocoding API


Request to the API with the Insert from URL script step

Geocoding & Reverse Geocoding


Request:
http://maps.googleapis.com/maps/api/geocode/output?

Output : json or XML


Parameters:
address or Lat,Lng
sensor (true or false)

Options:
Language

Geocoding
Request:
http://maps.googleapis.com/maps/api/geocode/xml?
address=5201+Patrick+Henry+Drive,Santa+Clara,CA
+95054,USA&sensor=false

Result
Parsing using Custom functions
<GeocodeResponse>
<status>OK</status>
<result>
<type>street_address</type>
<formatted_address>5201 Patrick Henry Dr, Santa Clara, CA 95054, USA</
formatted_address>
<address_component>
<long_name>5201</long_name>
<short_name>5201</short_name>
<type>street_number</type>
</address_component>
<address_component>
<long_name>Patrick Henry Dr</long_name>
<short_name>Patrick Henry Dr</short_name>
<type>route</type>
</address_component>
<address_component>
<long_name>Santa Clara</long_name>
<short_name>Santa Clara</short_name>
<type>locality</type>
<type>political</type>
</address_component>

Demo

Geolocation - Directions

Directions - Steps
Parsing multiple records to concatenate the
addresses
Creating one GoogleMaps URL request
http://maps.google.com/maps?q=5201 Patrick Henry
Drive, +Santa Clara, +CA, +95054, +USA+ to:1
infinite loop, +Cupertino, +CA, +95014,
+USA&output=embed

Demo

Directions - alternative option


Using the GoogleMaps Directions API
Geocoding the addresses as Lat/Lng coordinates
More options

Travel mode (Walking, Cycling, Driving, Transit)


Optimal route
Mileage
Waypoints...

https://developers.google.com/maps/documentation/
directions/

Geolocation - Multiple addresses

Steps
Geocoding the addresses in Lat / Lng coordinates
Script step (Insert from URL)
Parsing with Custom functions

Generate the HTML / Javascript


Custom function

Use the WebViewer in Data mode


"data:text/html," &....

Demo

Many options and parameters...

Custom Markers
Groups
Clusters
Actions
Photos
...

https://developers.google.com/maps/documentation/
javascript/reference

Geocoding - Alternative techniques


Batcheo
http://batchgeo.com

PHP
http://code.google.com/p/php-google-map-api/

Example :
http://monumentsmorts.univ-lille3.fr/cartographie/

Geolocation - Alternative APIs


Microsoft Bing
http://www.bing.com/maps/

OpenStreetMaps
http://www.openstreetmap.org/

NokiaMaps
http://maps.nokia.com

Mapping

Definition
Setup
Using FusionMaps
Using SVG

Mapping & FusionMaps by Infosoft

FusionMaps
Definition
Based on Flash
Script or Calculation driven
Not a Plug-in

Free

http://www.fusioncharts.com/extensions/filemaker/

Demo

Mapping & SVG

SVG
SVG (Scalable Vector Graphics)
XML-based file format for two-dimensional vector graphics,
both static and dynamic

XML = Text
Rendering in the Web viewer in Data mode
"data:image/svg+xml;charset=utf-8," ....

Demo

Important considerations
Licensing of Google Maps Use
Volatile
Connected
FileMaker Go compatibility

Conclusion
Unique way to represent Data
Think before you map

Resources
GoogleMaps Licensing terms
https://developers.google.com/maps/terms

Geocoding
https://developers.google.com/maps/documentation/
geocoding/

GoogleMaps Javascript API V3 Reference


https://developers.google.com/maps/documentation/
javascript/reference

GoogleMaps Directions API


https://developers.google.com/maps/documentation/
directions/

FileMaker examples
Starter Solutions (Contacts,...)
Using FileMaker Go 12 to track your Location by
Douglas Alder
http://homebasesoftware.wordpress.com/2012/06/28/wheream-i-using-filemaker-go-12-to-track-your-location/

Google Route Mapping, Part 1 & Part 2, by Kevin


Frank
http://www.filemakerhacks.com/?p=3802
http://www.filemakerhacks.com/?p=3891

Merci !

FileMaker Developer Conference 2012

Web Update Page


www.filemaker.com/devcon/speaker_updates
(This is also listed in your conference binder)
This session WILL have updates.

Thank You!
Please remember to fill out your
evaluation at:
www.filemaker.com/devcon/evaluations

Вам также может понравиться