Site icon Karen Attfield

Live routes with Google Maps API

(Article updated 9th February, 2018)

My latest project is a WordPress plugin, Maps for BuddyBeacon, which pulls location (beacon) data in from a route tracking app (ViewRanger), and displays this on a Google Map.

I was inspired to create this as a challenge after being involved in finding a solution to display the live route for Simon Clark who ran around the coast of Britain raising funds for charity. For that I used Social Hiking to embed a map in the charity website, and was so impressed I wanted to create a more simplified version for WordPress sites. Social Hiking have just announced that they will be closing at the end of May this year, unfortunately – they were a great resource that allowed hikers, cyclists, and walkers to share their adventures, and Phil Sorrel (the brains behind it) inspired me in terms of what a developer can create to help a community.

The map display

I recently put part of the code on CodePen to replicate pulling live location data and displaying the route, and it quickly became my most viewed pen. So, I thought I would briefly go through some of the challenges, and solutions in creating this.

The goal: Gather all information from the user needed to generate a map with a route, and display it on the front-end of a WordPress site via a shortcode.

The challenges

The ‘manage maps’ settings page

Some of the solutions

The Maps for BuddyBeacon plugin is available on the WordPress repository, and you can also find the source code on GitHub.

Future additions, time permitting:

I would love to collaborate with any other developers who would be interested in contributing to and growing this plugin.

Exit mobile version