8 Replies Latest reply on Nov 9, 2012 7:26 AM by pnajar



      I track a number of ships through out the world. For each ship I track I get a periodic update that updates their Latitude and Longitude. Is their a way to project the current location as well as past locations on a map within Filemaker (12)?

        • 1. Re: Maps

          Though I have no experience with this type of situation, I would bet that it can be done using a web viewer and Google Maps.

          • 2. Re: Maps



            attached is an example I received from via the FMSummit in Antwerpen, showing how to use the geocodes in a webviewer.

            Take note of the custom functions that are used.

            1 of 1 people found this helpful
            • 3. Re: Maps

              Hi pnajar,


                   i'm working in a similar project and my starting point is the example file that psijmons attached.


              Cheers, Fabio.

              • 4. Re: Maps

                Thank you very much for the example. It will take me a little while to understand it. Are there any additional explanations fort the design of the example?

                • 5. Re: Maps

                  In the example file, just look at the first 2 scripts (the other script were added by me just to do some testing), see how the webviewer is defined and look carefully at the custom functions.

                  You do not have to change anything in the code, just add to your solution:

                  • fields
                  • customfunctions
                  • scripts
                  • webviewer calculation

                  When you link it to your correct LNG / LAT geocode fields where appropriate.

                  Since you are already working with the geocodes and not addresses, you do not have to convert addresses, making it a lot simpler.

                  You need to feed an array of geocodes to HTML to display in the webviewer.



                  Here is an example HTML that is generated and will display the pointers right away:



                  <!DOCTYPE html>



                                      <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

                                      <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>

                                      <title>Google Maps Test</title>

                                      <style type="text/css">html, body {  height: 100%;  margin: 0;  padding: 0;}#map_canvas {  height: 100%;}</style>

                                      <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>

                                      <script type="text/javascript">

                                                function initialize() {

                                                          var myOptions = {

                                                                    zoom: 5,

                                                                    center: new google.maps.LatLng(46.52863469527167,2.43896484375),

                                                                    mapTypeId: google.maps.MapTypeId.ROADMAP,


                                                                              mapTypeIds: [google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.HYBRID]



                                                          var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

                                                          var markerBounds = new google.maps.LatLngBounds();

                                                          var markers = new Array(

                                                                    {"position":new google.maps.LatLng(37.4065103,-121.9842093)},

                                                                    {"position":new google.maps.LatLng(37.3308050,-121.8938260)),

                                                                    {"position":new google.maps.LatLng(37.3313684,-122.0306825)},

                                                                    {"position":new google.maps.LatLng(37.7843800,-122.4244850)}


                                                          var infoWindow = new google.maps.InfoWindow;

                                                          function addMarker(options){

                                                                    var marker = new google.maps.Marker({map:map});


                                                                    google.maps.event.addDomListener(marker, 'click', function() {


                                                                              infoWindow.open(map, marker);                    });


                                                                    return marker;          }

                                                          google.maps.event.addListener(map, 'click', function() {

                                                                    infoWindow.close();          });

                                                          var end = markers.length;

                                                          for(var i=0; i<end; i++) {


                                                                              position: markers[i]['position'],

                                                                              title: "Marker "+i,

                                                                              info: markers[i]['info']                    });}





                            <body onload="initialize()">

                                      <div id="map_canvas"></div>



                  • 6. Re: Maps

                    Thanks for the help. This example will take me, a FileMaker novice, sometimes to assimilate. Improving FileMaker skills is the goal of this project.

                    • 7. Re: Maps



                      If you can bear a bit of French, here is a full explanation webinar plus all samples :


                      Séminaire Web Cartographie et géolocalisation Lundi 9 juillet de 11h à 12h



                      Or if you have attended Devcon in Miami it's the sesison INT005



                      1 of 1 people found this helpful
                      • 8. Re: Maps

                        Again thanks. As it turns out French is my second language.


                        Much appreciated