{"id":1570,"date":"2018-07-14T09:49:31","date_gmt":"2018-07-14T09:49:31","guid":{"rendered":"https:\/\/www.benfreke.org\/?p=1570"},"modified":"2021-11-02T19:24:12","modified_gmt":"2021-11-02T19:24:12","slug":"livetracks-php","status":"publish","type":"post","link":"https:\/\/wordpress.benfreke.org\/2018\/07\/14\/livetracks-php\/","title":{"rendered":"LiveTracks (PHP)"},"content":{"rendered":"

LiveTracks is a live tracking implementation using FollowMee and a simple PHP back-end and JavaScript front-end.<\/p>\n

<\/p>\n

Essentially, the PHP back-end calls the FollowMee API at regular intervals to get the latest location of the phone. If the location has not changed, it will ignore the update. If it has, it take the location and speed and put it into the database.<\/p>\n

When loading the map, the database is queried for tracks and they are passed in to the Google Maps JavaScript API which displays them on a track. The JavaScript then creates an asynchronous process to continually update the map on the screen.<\/p>\n","protected":false},"excerpt":{"rendered":"

LiveTracks is a live tracking implementation using FollowMee and a simple PHP back-end and JavaScript front-end.<\/p>\n","protected":false},"author":1,"featured_media":1571,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/wordpress.benfreke.org\/wp-json\/wp\/v2\/posts\/1570"}],"collection":[{"href":"https:\/\/wordpress.benfreke.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.benfreke.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.benfreke.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.benfreke.org\/wp-json\/wp\/v2\/comments?post=1570"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.benfreke.org\/wp-json\/wp\/v2\/posts\/1570\/revisions"}],"predecessor-version":[{"id":1823,"href":"https:\/\/wordpress.benfreke.org\/wp-json\/wp\/v2\/posts\/1570\/revisions\/1823"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordpress.benfreke.org\/wp-json\/wp\/v2\/media\/1571"}],"wp:attachment":[{"href":"https:\/\/wordpress.benfreke.org\/wp-json\/wp\/v2\/media?parent=1570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.benfreke.org\/wp-json\/wp\/v2\/categories?post=1570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.benfreke.org\/wp-json\/wp\/v2\/tags?post=1570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}