","address":"Newlands Corner, Shere Road, Guildford, Surrey","aidStationName":"Newlands Corner","race":"593684b9e60056503339c7b0","__v":0,"volunteerInstructions":"","liveTiming":true,"raceFinish":false,"raceStart":false,"toilet":true,"dropBag":false,"crewAccess":true,"mile":14.7,"location":"51.232862, -0.507758","type":"aid station"},{"_id":"593684b9e60056503339c7b9","slug":"box-hill-stepping-stones-26","cutOff":"2018-05-19T13:10:00.000Z","estLeader":"2018-05-19T10:05:00.000Z","postCode":"RH5 6AA","crewInstructions":"
No Crew Access Permitted.
","address":"Stepping Stones Car Park, Box Hill, Dorking.","aidStationName":"Box Hill Stepping Stones","race":"593684b9e60056503339c7b0","__v":0,"volunteerInstructions":"","liveTiming":true,"raceFinish":false,"raceStart":false,"toilet":false,"dropBag":false,"crewAccess":false,"mile":24,"location":"51.2493216024665, -0.3233939409255","type":"aid station"},{"_id":"593684b9e60056503339c7b8","slug":"reigate-hill-33","cutOff":"2018-05-19T15:00:00.000Z","estLeader":"2018-05-19T11:20:00.000Z","postCode":"RH2 0HX","crewInstructions":"The aid station is situated in the middle of the Wray Lane Car Park. The Car Park is situated at the crest of the hill of a road called Wray Lane and is less than a minute from Junction 8 of the M25. The best way to approach it is to get off at Junction 8 and take the turn off at the roudabout for the A217, then take the first left off of the A217 and Wray Lane is the immediate right hand option off ahead of you. As you drive down Wray Lane there is a turning to the right which leads into the Car Park. Ahead is one way up Wray Lane coming towards you so you should not be able to go wrong.
","address":"Wray Lane Car Park, Reigate Hill","aidStationName":"Reigate Hill","race":"593684b9e60056503339c7b0","__v":0,"volunteerInstructions":"","liveTiming":true,"raceFinish":false,"raceStart":false,"toilet":true,"dropBag":false,"crewAccess":true,"mile":31,"location":"51.2560870006015, -0.1918315887451","type":"aid station"},{"_id":"593684b9e60056503339c7bf","slug":"caterham-42","cutOff":"2018-05-19T16:50:00.000Z","estLeader":"2018-05-19T12:00:00.000Z","postCode":"CR3 6ES","crewInstructions":"No Crew Access Permitted.
","address":"Caterham View Point, Gravelly Hill, Caterham","aidStationName":"Caterham","race":"593684b9e60056503339c7b0","__v":0,"volunteerInstructions":"","liveTiming":true,"raceFinish":false,"raceStart":false,"toilet":false,"dropBag":false,"crewAccess":false,"mile":38,"location":"51.2632978524541,-0.0778698921203","type":"aid station"},{"_id":"593684b9e60056503339c7c3","slug":"botley-hill-47","cutOff":"2018-05-19T18:10:00.000Z","estLeader":"2018-05-19T12:40:00.000Z","postCode":"CR6 9QH","crewInstructions":"No Crew Access Permitted.
","address":"Titsey Estate Car Park, Botley Hill, Warlingham","aidStationName":"Botley Hill","race":"593684b9e60056503339c7b0","__v":0,"volunteerInstructions":"","liveTiming":true,"raceFinish":false,"raceStart":false,"toilet":false,"dropBag":false,"crewAccess":false,"mile":43,"location":"51.2812227261895,0.0039803981781","type":"aid station"},{"_id":"593684b9e60056503339c7be","slug":"knockholt-pound-55","cutOff":"2018-05-19T20:00:00.000Z","estLeader":"2018-05-19T13:45:00.000Z","postCode":"TN14 7LE","crewInstructions":"The race finish is in the fields behind Knockholt Pound Village Hall. All cars must park at Coolings Green and Pleasant (note this is different to Coolings Garden Centre on Rushmore Hill), Main Road, Knockholt, TN14 7LJ. This is a 5 minute walk from the finish, almost directly opposite the village hall.
","address":"Knockholt Village Hall, Main Road, Knockholt Pound, Sevenoaks, Kent.","aidStationName":"Knockholt Pound","race":"593684b9e60056503339c7b0","__v":0,"volunteerInstructions":"Park at Coolings Green and Pleasant (note this is different to Coolings Garden Centre on Rushmore Hill), Main Road, Knockholt, TN14 7LJ. This is a 3 minute walk from the Hall.
","liveTiming":true,"raceFinish":false,"raceStart":false,"toilet":true,"dropBag":true,"crewAccess":true,"mile":50,"location":"51.3150699404, 0.1213109493255","type":"aid station"}]; window.addEventListener('load', function () { $.ajax("//centurionrunning.s3-eu-west-1.amazonaws.com/races/gpx/7342db4a2690697d099fc5442f115918.gpx").done(function(xml) { var data = toGeoJSON.gpx((new DOMParser()).parseFromString(xml, 'text/xml')); if(!data.features[0] || !data.features[0].geometry ||!data.features[0].geometry.coordinates[0]){ console.log('Error with GPX'); return; } mapboxgl.setRTLTextPlugin('https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.0/mapbox-gl-rtl-text.js'); map = new mapboxgl.Map({ container: 'map', style: '/maps/style.json', attributionControl: false, hash: false, minZoom: 6, maxZoom: 14.99, center: data.features[0].geometry.coordinates[0], zoom: 10 }); map.on('load', function(){ map.addSource('trace', { type: 'geojson', data: data }); map.addLayer({ "id": "trace", "type": "line", "source": "trace", "paint": { "line-color": "red", "line-opacity": 0.75, "line-width": 4 }, "filter": ["==", "$type", "LineString"] }); var coords = data.features[0].geometry.coordinates; bounds = coords.reduce(function(bounds, coord) { return bounds.extend(coord); }, new mapboxgl.LngLatBounds(coords[0], coords[0])); fitBounds(50); map.loadImage("/maps/marker-blue-15.png", function (error, image) { if (error) throw error; map.addImage('marker15', image); map.addSource('aidstations', { type: 'geojson', data: createGeoJSON(aidstations) }); map.addLayer({ "id": "aidstations", "type": "symbol", "source": "aidstations", 'layout': { 'visibility': 'visible', }, "layout": { "icon-image": "marker15", "icon-size": 1.1, "icon-allow-overlap": true, 'text-allow-overlap': true, "text-field": "{aidStationName}", "text-font": ["Noto Sans Regular"], "text-size": 11, "text-offset": [0, 1.50], "text-anchor": "center" }, "minzoom": 4, "maxzoom": 16, "paint": { "text-color": "hsl(0, 0%, 0%)", "text-halo-color": "hsla(0, 0%, 100%, 0.75)", "text-halo-blur": 0, "text-halo-width": 2 } }); }) }); }); });