Archive for Coding

Embedding My London Marathon Route App

If you have a website and would like to embed my marathon route code seen here I am trialing a piece of code that you can embed. This may not work so be please be patient with me – I wrote the code to work on my own site environment and not to embed.

If you run wordpress you need to paste the following block:

<code><iframe src=http://neillock.co.uk/embed.php?hh=4&mm=10&ss=10&&name=neil%20lock&number=1242 frameborder=0 height=720px width=820px scrolling=”no”></code>

If you just use a normal site you don’t need the code tags so just:

<iframe src=http://neillock.co.uk/embed.php?hh=4&mm=10&ss=10&&name=neil%20lock&number=1242 frameborder=0 height=720px width=820px scrolling=”no”>

If you look at both of the above snipetts the code calls a webpage: http://neillock.co.uk/embed.php?hh=4&mm=10&ss=10&&name=neil%20lock&number=1242 if you change the values after hh=(hour), mm=(minutes), ss=(seconds), name=(name that appears in the box nb %20 is equal to a space) and number=(your vest number).

Hopefully it will embed and play nice – who knows. Your site will need to be at least 800px wide otherwise it will hang over the edge. If you want it to fit you can technically play around with theĀ  height=720px width=820px values and set scrolling=”yes”.

If you do embed this PLEASE can you give me a mention / shoutback just so I know who has used this!

Neil

Leave a Comment

Garmin PHP API

NB When I posted this blog I thought I would update this code base a little more – as there was limited (read none) feedback and requests for it I stopped working on it. Should you want some info about the code feel free to ping me a comment on this thread and ill get back to you!

I am a developer by trade and one of the reasons I bought this Garmin device was to play with what extra stuff I could get above and beyond my Nike+.

When I searched google I couldn’t really find any form of api to interact with the data so I cobbled together a first draft of stuff. Currently the code is used to pull the TCX file from the garmin site extract the raw data and create an embeddable google map (see below). I will provide the JS file and some code for others to embed on there own blog very soon and will attempt to update the php classes when I need to update them for my own benefit!

Please find all code classes in this folder: http://neillock.co.uk/code/php/. This code is *roughly* commented. For simplicity I have also created phps files for you to look at before downloading here
http://neillock.co.uk/code/phps/.

If you do look at, use, sniff at any of my code can you give me a shout – it would be cool to see what others have done with it! Also if I have been beaten to the mark and there is better api out there shout cause I couldn’t find it!!!

Neil

Leave a Comment