{"id":480,"date":"2014-08-28T21:05:47","date_gmt":"2014-08-28T17:05:47","guid":{"rendered":"http:\/\/localhost\/gwj_new\/?page_id=480"},"modified":"2015-03-09T00:48:43","modified_gmt":"2015-03-08T20:48:43","slug":"track-me","status":"publish","type":"page","link":"https:\/\/goodwilljourney.org\/?page_id=480","title":{"rendered":"Track Me"},"content":{"rendered":"<style>\r\n\t#map_canvas {\r\n  height: 450px;\r\n}\r\n\r\n@media print {\r\n  html, body {\r\n    height: auto;\r\n  }\r\n\r\n  #map_canvas {\r\n    height: 450px;\r\n  }\r\n}\r\n\t<\/style>\r\n   \r\n    <script type=\"text\/javascript\" src=\"http:\/\/maps.googleapis.com\/maps\/api\/js?v=3&key=AIzaSyCNuiVNe7eMedIPAkvZf4f9VocPssijrhk&sensor=false\"><\/script>\r\n\t<script type=\"text\/javascript\" src=\"tracking\/jquery-1.11.2.min.js\"><\/script>\r\n\r\n<script type=\"text\/javascript\">\r\nwindow.location.replace(\"http:\/\/goodwilljourney.org\/tracking\/\");\r\n\r\n$( document ).ready(function() {\r\nvar map;\r\nvar bikePath;\r\nvar currentMarker;\r\nvar fetchRate = 180000;\r\n\r\n\t\r\n            var myOptions = {\r\n                zoom: 9\r\n                ,mapTypeId: google.maps.MapTypeId.NONE\r\n\t\t\t\t,liteMode: true\r\n\t\t\t\t,scaleControl: true\r\n\t\t\t\t,overviewMapControl: true\r\n\t\t\t\t,zoomControl: true\r\n\t\t\t\t,zoomControlOptions: {\r\n        style: google.maps.ZoomControlStyle.SMALL\r\n        \r\n    }\r\n            }\r\n            map = new google.maps.Map(document.getElementById(\"map_canvas\"), myOptions);\r\n\r\n\t\t\tfirstCall  = setInterval(getPoints, 500);\r\n\t\t\t\r\n\r\nmap.controls[google.maps.ControlPosition.LEFT_CENTER].push(document.getElementById('days'));\r\nmap.controls[google.maps.ControlPosition.LEFT_CENTER].push(document.getElementById('distance'));\r\n\r\n\/\/Start\/Current  Marker\r\n\r\n   var startMarker = new google.maps.Marker({\r\n                position: new google.maps.LatLng(25.34244, 55.36532)\r\n                ,map: map\r\n                ,title: 'Started March 1,2015'\r\n\t\t\t\t\t\t});\r\n\tvar infoWindow = new google.maps.InfoWindow();\r\n            var html = \"<center><b>Started March 1,2015<\/b><\/center>\";\r\n            google.maps.event.addListener(startMarker, 'click', function () {\r\n                infoWindow.setContent(html);\r\n                infoWindow.open(map, startMarker);\r\n            });\r\n\r\n\t currentMarker = new google.maps.Marker({\r\n             icon:'http:\/\/mt.google.com\/vt\/icon?psize=25&font=fonts\/Roboto-Bold.ttf&color=ff135C13&name=icons\/spotlight\/spotlight-waypoint-a.png&ax=44&ay=50&text=\u2022'\r\n             ,animation: google.maps.Animation.BOUNCE\r\n\t\t\t ,map: map\r\n\t\t\t\t\t\t});\r\n\/\/Bike Path\r\nbikePath = new google.maps.Polyline({\r\n          geodesic: true,\r\n          \/\/strokeColor: '#FDB525',\r\n          strokeColor: '#80C740',\r\n          strokeOpacity: 1.0,\r\n          strokeWeight: 6,\r\n          map:map\r\n        });\r\n\t\t\/\/}\/\/END: INIT\r\n\/***************************\/\r\n\r\n    function getPoints() {\r\n\t\tclearInterval(firstCall);\r\n            $.ajax({\r\n                url: 'tracking\/direct.json.php',\r\n\t\t\t\tcache: false,\r\n                type: 'GET',\r\n                dataType: 'text',\r\n                timeout: 60000,\r\n                success: function (data) {\r\n\t\t\t\tdata = eval(data);\r\n\r\n\t\t\t\tbikePath.setPath(data[0]);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tmap.panTo(data[0][data[0].length-1]);\r\n\t\t\t\t\r\n\t\t\t\tcurrentMarker.setPosition(data[0][data[0].length-1]);\r\n\t\r\n\t\t\t\t$('#days').html('Day  '+data[1][0].days);\r\n\t\t\t\t$('#distance').html(data[1][0].dis+' Kilometers');\r\n\t\t\t\t\r\n\t\t\t\t\t}\/\/Success\r\n            });\/\/Ajax\r\n\t\t\t\r\n\t\t\t\r\nsetInterval(getPoints, fetchRate);\r\n\r\n\r\n        }\/\/getPoints\r\n\r\n\r\n\t\t\r\n  $('#days, #distance').css({\r\n\t\"color\":\"#FDB525\"\r\n\t,\"background\": \"#fff\"\r\n\t, \"font-size\": \"150%\"\r\n\t, \"font-weight\": \"900\"\r\n\t, \"font-family\":\"Roboto,Arial,sans-serif\"\r\n\t, \"padding\":\"0.5em\"\r\n\t, \"padding-left\":\"5%\"\r\n\t,\"border\" :\"2px solid #fff\"\r\n\t,\"borderRadius\" : \"4px\"\r\n\t,\"boxShadow\" :\"0 2px 40px rgba(0,0,0,0.80)\"\r\n\t,\"textAlign\" : \"center\"\r\n\t\t\t\t});\r\n\t\r\n});\r\n\r\n\r\n    <\/script>\r\n\r\n    <div id=\"map_canvas\">\r\n    <\/div>\r\n\t<div id=\"days\"><\/div>\r\n\t<div id=\"distance\"><\/div>\n<p>&nbsp;&nbsp;<br \/>\n<center><br \/>\n<a title=\"View Large Map\" href=\"http:\/\/goodwilljourney.org\/tracking\" target=\"_blank\">View Larger Map<\/a><br \/>\n<\/center><br \/>\n&nbsp;<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp; View Larger Map &nbsp;<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/goodwilljourney.org\/index.php?rest_route=\/wp\/v2\/pages\/480"}],"collection":[{"href":"https:\/\/goodwilljourney.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/goodwilljourney.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/goodwilljourney.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/goodwilljourney.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=480"}],"version-history":[{"count":32,"href":"https:\/\/goodwilljourney.org\/index.php?rest_route=\/wp\/v2\/pages\/480\/revisions"}],"predecessor-version":[{"id":622,"href":"https:\/\/goodwilljourney.org\/index.php?rest_route=\/wp\/v2\/pages\/480\/revisions\/622"}],"wp:attachment":[{"href":"https:\/\/goodwilljourney.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}