Donate using PayPal

CycleStreets blog

News from CycleStreets

Moving to Leaflet.js

July 27th, 2014

This is a tech post mainly for our OpenStreetMap and techie users!

During recent months we’ve quietly been working on a major change behind the scenes in preparation for some large-changes to our web interface (which has long been in need of upgrading) and to prepare for a more mobile-friendly experience:

We’ve moved the large amount of our mapping code from OpenLayers 2 to Leaflet. This is the part of the site you see whenever you come across a map that you can drag around – the ‘slippy maps’. Last Monday, our commit “Removed OpenLayers” landed.

This has been quite a major undertaking, and a rather painful one at that. It has meant not only rewriting every bit of map javascript code, but also creating a new, second-generation API (data feed) using GeoJSON, as that is the native format that makes working with Leaflet so easy. In creating the V2 API, we’ve also had to keep every part of the old V1 API running perfectly so as not to break third-party mobile apps and sites that rely on it.

We had to rewrite Javascript modules for the every one of the types of slippy map used around on the site:

The V2 API (the technical interface to the underlying data that gets shown on the maps) emits data in the easily-parsable GeoJSON format. The V2 API, to be made public soon, is something we’ve wanted to do anyway for a while now. As we’ve moved to GeoJSON, we’ve found that throwing objects of all kinds onto a map is far easier compared to generating GML using XML DOM structures and writing Javascript to handle that.

When we launched CycleStreets back in 2009, GML was in vogue, and OpenLayers was the only real choice available. In fact, in 2009, many of the wonderful tools like Leaflet, jQuery, and autocomplete were either not available or were in their infancy. Now these tools are available, we no longer have to deal with the pain of generating XML DOM (for GML) structures and that is a very welcome relief.

It’s fair to say that we’ve always struggled with OpenLayers 2. OpenLayers is a very powerful map framework, basically letting you do almost anything on top of a map canvas, and with a very ‘correct’ object-orientated style. But with things like a standard web projection and GeoJSON standardisation now the norm for web mapping, the swiss-army-knife approach has not been ideal for us.

The force-point came for us when we ran into an intractable problem where a clickable layer of shop icons, used on a journey planner we run for a third party, had the odd behaviour that one of the two start/finish itinerary waypoint markers could not be moved if an icon had been clicked. We spent two days trying to debug this, even going as far as picking through the OpenLayers source code. Long ago we had learnt which of the five popup types to use, but we simply could not work out the mechanism for changing focus between layers. So we changed tack, generating GeoJSON for the icon layer and got a prototype working in Leaflet pretty quickly, and it ‘just worked’. From that point our V2 API project really got going.

It’s great to see that a new version of OpenLayers, OpenLayers 3, is in the works, which will undoubtedly take that very respected project forward. But for us, for now, Leaflet is where we plan to put our development focus.

PS The V2 API is going live shortly. All of our site is running from it and documentation is in place – we’ve just resolving the remaining few format issues now.

Our debugging view, now running from a GeoJSON data endpoint in our V2 API

Our debugging view, now running from a GeoJSON data endpoint in our V2 API.

The redesign upgrade project, of which the above work is part, has been possible thanks to part-funding from the Cambridge City Council Cycling & Walking Grants scheme, helping get more people cycling in Cambridge. We are most grateful to them for their support.

Cycle Hackney app created by CycleStreets

July 6th, 2014

cyclehackneylogo

We’ve created a new app for Hackney Council, the Cycle Hackney app.

Available for both iPhone and Android, the app aims to provide information to the Council on where people cycle for their daily journeys, and where improvements to the street and path network are most needed. This combines crowsourced GPS traces to help create a heatmap of utility cycle journeys.

Download on the App Store    Get it on Google Play

The app is aimed at utility journeys – everyday cycle journeys, rather than being an app for the sport or time-trialling demographic that can be found elsewhere.

Cycle Hackney app - screenshot     Cycle Hackney app - screenshot

After each journey, a short questionnaire appears to obtain some basic demographic information – this only takes a few seconds to complete:

Finished recording

In a press release for the app, we said:

“We’ve been pleased to create the Cycle Hackney app for Hackney Council. Although there are other apps for leisure route sharing, none have focussed on utility cycling data. The app will help identify streets and paths heavily used for everyday cycle journeys, as well as letting people report problems on the network. Local people can therefore use it to help the Council improve cycle infrastructure that will enable more people to cycle. Higher cycling levels are crucial for economic, environmental and health reasons, and Hackney is a leading borough in this.”

The app was launched at the Hackney Cycling Conference 2014. Hackney Council asked attendees of the conference to come up with an unusual or notable route to the conference. Here were the two winning entries:

One person, the winning entry, cycled the boundary of Hackney – an impressive feat!

Hackney boundary

Another person took the opportunity to create some ‘GPS art’ to spell out ‘I Love Hackney Cycling’:

I Love Hackney Cycling

As well as giving a list of routes, enabling users to track their distance and calorie usage, the app allows people to upload reports of problems they encounter in their daily journeys.

Cycle Hackney app - screenshot     Cycle Hackney app - screenshot

We’re pleased that the new app was a finalist for the London Cycling Campaign Awards 2014, in the Digital Campaign of the Year category.

Hackney Council’s transport team would welcome any feedback on the app, for instance, new features that would be useful to add, or other feedback. We’ve enjoyed working with Hackney on this project.

The app uses code from Cycle Atlanta and our own CycleStreets apps. The app has been created by our developers,  Neil Edwards (iPhone) and Jez Higgins (Android).

PS We can create apps for Local Authorities and others that combine our portfolio of cycle mapping solutions – journey planner, photomap for reporting problems, GPS tracking, and information updates. Do get in touch if this may be of interest.

Quietly working away…

June 23rd, 2014

This blog has been a bit quiet recently, as we’ve been quietly working away very hard on a range of projects which are now being launched. We’ll have blog posts on each of these in the coming weeks:

  • The new Halfords cycle journey planner is live on their website, complementing their wide range of bikes and advice to help people get cycling. It includes map markers for easy directions to their stores.
  • We’ve created the Cycle Hackney app (iPhone and Android) for Hackney Council, which aims to provide information to the Council on where people cycle for their daily journeys, and where improvements to the street and path network are most needed. This combines crowsourced GPS traces to help create a heatmap of utility cycle journeys. The app was launched at the Hackney Cycling Conference 2014.
  • We created the Urban Cycle Parking website for London Cycling Campaign, which enables cyclists in London to pinpoint where cycle parking is needed and where it already exists, with all data being fed to Transport for London (plus existing parking data to OpenStreetMap)
  • We’ve created a batch routing system (with a job control web interface) for one of our app routing data users, which creates a matrix of all possible routes between cycle hire stations (e.g. the London Cycle Hire scheme) or within a grid of squares within a city.
  • We’ve supported the CTC’s Space for Cycling portal, whose photos also go into our Photomap, helping build on the fantastic library of over 50,000 locations (all fully-categorised) already present.
  • We’re finalising the launch of our API (data interface) Version 2 – this is a modern JSON-only API interface to the many parts of our system, and corrects many of the frustrations of our current API. As well as making things much easier for mobile and other websites to obtain routes and integrate with other facilities we offer, it adds new API calls, GeoJSON output for all geographical features by default, new  features, standardised error handling, and a fresh set of documentation complete with clear examples.
  • We’ve almost completed replacing all the code that powers our slippy maps from OpenLayers-based to Leaflet. Changes like that happen ‘inside the crankcase’ and give us more power and flexibility to develop the system while users are often unaware that there have been changes – which is generally a good thing. This will enable us finally to add long-demanded features such as multiple waypoints, draggable routing and leisure routing options, which our underlying data interface (API) has supported now for quite some time. This has been a large task, with much knock-on internal reworking, including the need to have GeoJSON output in the API while not disrupting other users of our API. This work is part of a project to overhaul and modernise our web interface, which has been partly funded thanks to a Cambridge Cycling & Walking Promotion grant. We’d like to thank Cambridge City Council for enabling this long-awaited project to move forward. We’ll shortly be seeking out a designer and blogging more about our aims with this large project.
  • We’ve added a user profile available to each user on the site, so all photos by a user are grouped together. This facility will continue to evolve.
  • Cyclescape, our toolkit for cycle campaigners [read more], has seen a range of improvements and fixes.
  • For Cambridge Cyclescape, we’re pleased to announce a grant from Cambridge Sustainable City who have kindly given a grant to fund some changes specifically requested by the Cambridge group – we’ll report on the Cyclescape blog soon about these developments.

Stay tuned to the blog for articles on each of these.

PS One of our lead developers, Martin, has co-written ‘Making Space for Cycling‘, a new publication endorsed by the whole spectrum of UK cycling advocacy groups. It explains to UK decision-makers how best to provide cycle infrastructure that will get more people cycling. Paper copies can be obtained from Cyclenation and Cambridge Cycling Campaign.

The CycleStreets logo – a bit of history

June 23rd, 2014

Our mobile team has been working on updates to our apps recently, and we’ve been working with our designer Ayesha on a modernised icon for the Windows Phone and iPhone apps.

During the discussion, Simon (our lead developer) gave a bit of history about the CycleStreets logo, which we thought would be interesting to share.

“I can claim to be the one who designed the CycleStreets logo itself.

It came out of a fairly intensive two weeks of trying out and sharing all sorts of designs with a few of us in early 2009. It was designed with GIMP software, and based on our earlier CamCycle logo with a road going off into the distance.

It took ages to get the curve right using the paths tool to control the splines, but the moment of magic occurred when I realised that the ponytail should become a scarf with the same shape as the road.”

CycleStreets has always been about practical cycling for everyday journeys, and we think the logo, featuring a bike with basket, rack and mudguards, reflects this.

CycleStreets logo

Transition Black Isle embeds CycleStreets into its website to help cut one million car miles

April 8th, 2014

CycleStreets has worked with Transition Black Isle to provide an embedded cycle journey planner for their website. Peter Elbourne, project officer for the Million Miles project explains.

Million Miles logo

Transition Black Isle is a community organisation and registered charity that aims to take local action on issues relating to peak oil and climate change. The group decided to undertake a bold project to make local travel more sustainable and, in March 2012, they were awarded a grant of £195,000 from the Climate Challenge Fund. Transition Black Isle’s Million Miles project aims to cut one million car miles by 2015 by encouraging active travel, improving access to public transport and promoting greener car travel.

One of the key objectives of the Million Miles project is to create an active travel map of the Black Isle to signpost less confident cyclists along quiet off-road tracks through farmland and forests. However, the group had some significant hurdles to overcome:

  • The Black Isle is a large rural peninsula with a dispersed population, which makes gathering information about routes a time-consuming and arduous process and it is also difficult to know what journeys local residents make.
  • Active travel routes will change over time (e.g. alteration of forestry tracks, new purpose-built paths), which means that a map could be out-of-date soon after printing.

Transition Black Isle cycle journey planner

Transition Black Isle’s solution was to ‘crowdsource’ mapping data by asking local people to contribute information to the online map, OpenStreetMap. This innovative approach means that the group has access to a digital map that can continually be updated. A diverse network of contributors – including keen walkers, weekend cyclists and even remote mappers without a particular connection to the Black Isle – have been adding to the map since early 2013. Huge amounts of progress has been made and the peninsula is mapped on OpenStreetMap with valuable detail for walking and cycling, providing information such as track surface, barriers, access and bike parking.

Transition Black Isle is now looking to create a printed map to distribute locally, but a single map cannot convey all of the information that is available through OpenStreetMap. The group had been promoting CycleStreets locally as it was a great application for the information they collectively contributed to OpenStreetMap. Their experience of our bespoke lift-sharing website highland.liftshare.com demonstrated that it is important to promote an online service with a local connection, so Transition Black Isle decided to take advantage of an offer from CycleStreets to embed a version of the journey planner into their website. After a quick and hassle-free set up, cycleroutes.transitionblackisle.org went live in April 2014!

Peter Elbourne, project officer for the Million Miles project said:

“CycleStreets now fits seamlessly into our website and with the homepage map centred over the Black Isle, selecting the start and end points of a route is straightforward and you can toggle between a selection of useful background maps and aerial photography.”

“Quiet, Fastest and Balanced are the ideal categories for routes options from A to B because people using the journey planner will take different approaches to cycling: one cyclist may want to stick to the roads and get somewhere as quickly as possible and another may be happy meandering through the forests free from traffic.”

Culbokie Journey on embedded CycleStreets planner

The screenshot below shows some of the work that has been done to improve the OpenStreetMap map data in the area. Peter said:

“It’s particularly satisfying when CycleStreets routes you along a forest access road or farm track that you added to OpenStreetMap – it completes the circle!”

OSM Culbokie Apr 2013 to Jan 2014

Transition Black Isle will also ensure that their printed map heavily promotes OpenStreetMap and the new online cycle router. In a sense, the printed map will be an elaborate flyer for cycleroutes.transitionblackisle.org. There’s a lot going on in the Million Miles project – visit the page on the group’s website for more information.

Want an embedded cycle journey planner on your website? Read our page to find out more.

What do you call a path alongside a road?

November 28th, 2013

Cycle routes very often use un-named paths. These create a headache for anyone who tries to give directions to a cyclist:

“take the cycleway alonsidge this road, at a junction with two other paths turn right under the bridge, then go down a snicket on the left …”

It’s a key issue for us trying to produce intelligible itinerary listings — and even more important for our sat nav users where the names are called out!

Showing a fork in a cycle path.

“Bear right onto un-named link.”

Some examples include:

  • short links from a cul-de-sac onto one of a town’s radial routes
  • useful permeability links or short-cuts often known by colloquial phrases such as jitties or snickets
  • paths across open spaces
  • roads that begin paved but farther down revert to a track
  • bridleways
  • redways in Milton Keynes, cycleways in Stevenage
  • old railway lines that have become cycle routes (though these usually get a name)
  • short links addded to join cycle routes – often forming the hypotenuse of a triangle

Direct tagging

CycleStreets uses the street name if directly tagged in OpenStreetMap. If the name is not available any cycle route tagging from the way or any of it’s relations is checked. This results in names such as NCN51 or CS3.

Using only direct tagging still leaves an awful lot of un-named ways. As a fallback they can inherit names from the ways they join. Depending on how many joins there are we’ve used names following these patterns:

  • Link with …
  • Link between … and …
  • Link joining …, …, …

This has always been rather awkward and only slightly better than leaving them un-named. But when our sat nav apps call out such long conglomerations it sounds really painful — and something we just had to sort out!

Shared use path between Fulbourn and Cherry Hinton.

What’s a good name for the shared-use pavement cycleway between Fulbourn and Cherry Hinton?

Inferring better names

We’ve tackled this problem by using indirect data to invent more useful names. The result is that you’ll see the following phrases appearing in the street names of our itinerary listings:

‘Alley off …’

Where there’s a short un-named spur off a named way, for instance: Alley off Braithwaite Cresecent

‘… continuation’

An example is Gairbraid Avenue in Glasgow, the criteria used to identify these cases include:

  • Short: up to about 100 metres – renaming very long ways that match stretches the credibility of the idea
  • Only has two joints
  • Continuations of ways join to only one other way at one end
  • Cases where the joins at both ends are more complex are ignored.

‘… Blind Alley’

Like continuations but have connections only at one end, Canberra Close for example

‘Alongside …’

Some very useful cycle routes often run alongside roads, and are also often un-named in OpenStreetMap. We detect these cases by checking that the name of the nearest road at several points along the length of the cycleway. If the same name matches at least 70% of the length then the cycleway inherits the name of the road by being prefixed with ‘Alongside’. As an added bonus, we added a little easter egg relating to road names with ‘Drive’ in them.

A good example of the alongside names are shown in this route and this one.

Other names

The techniques above result in more sensible names for many tens of thousands of ways in the British Isles. We use some more techniques for fixing names across open spaces and inferring names of very short links between named ways.

As a general principle we try to make best use of what data there already is in OSM rather than suggest new rules about how it should be used. But in doing this work we’ve noticed that some ways drawn in OSM carry on round the corner to run alongside differently named roads. Such cases won’t inherit the ‘Alongside …’ name because of the 70% quality threshold. To fix that those ways should be split at the corner. We did split the long cycleway between Cherry Hinton and Fulbourn at the point where the adjacent road changed its name.

The second street named in this route shows that we’ve still got a way to go to cover more cases for choosing better names, but as ever this work is ongoing.

Latest update to CycleStreets for Windows Phone

October 17th, 2013

The latest update to CycleStreets for Windows Phone is now available.

We’ve done some significant work on improving the user interface for plotting routes in the directions screen as well as adding a quicker tap destination and find directions from my current location option on the home screen. We’d really appreciate your feedback on this change and whether it improves things or not. Here is the full changelist:

What’s new in version 1.3?

  • Improved the accuracy of the GPS
  • Draw location accuracy around my location dot
  • Fix for missing submit button in feedback form on some devices
  • Reworked the route plotting and added “tap to add waypoint”
  • Navigation and UI improvements on navigation page

A hotfix release will be available soon to fix OpenCycleMap overlays displaying OpenStreetMap overlays instead.

As always we really do appreciate your feedback especially if you use the app regularly. Our developer, Dave Conley, is fixing things that annoy him when using the app, but it is great to get feedback from other users. If you think the app is perfect as it is then don’t forget to rate us 5* so other cyclists can find us easier. Thanks!

State Of The Map 2013 – Cyclestreets presentation

September 7th, 2013

Martin giving our presentation - Photo by Alexander Kachkaev

State Of The Map is the annual conference of OpenStreetMap (OSM), whose fantastic data we make use of to provide cycle routing.

We gave two presentations at State Of The Map 2013 which this year was held in Birmingham.

It’s the annual gathering of people who collect street data as well as those who, like us, make use of it.

We gave two presentations, one on the range of websites and apps that use our cycle routing. The other was on a project within the OSM community that we’ve been running to encourage OSM members to merge in cycle route information from the Department for Transport.

You can view our two presentations here:

CycleStreets – more than a router (State Of The Map 2013):

England Cycling Data Project:

Windows Phone app update adds leisure routing, route saving, and more

August 14th, 2013

3D view

The first update for CycleStreets on Windows Phone is out now! As well as fixing the usual bugs, version 1.1 adds some great new features.

The new release brings along leisure routing, which is a great feature that can find a circular route around your current location that is of a distance or time of your choosing. Great if you’re training and want to get in a 20 mile ride for example.

We’ve made big improvements to the reliability of the place name search when routing and also to the tutorial flow improving the overall usability of the app.

If you just want to save the route for later you can do that too and you won’t need to be online to load it. And you can now share routes with friends via email, text message or social network (and they don’t need the app to be able to view it).

We also have a free 24 hour trial that allows you to try all the features of the app with no restrictions for a day. After that you can choose to get in touch and let us know what you thought or hopefully go on to pay for the full app (only 99p!).

You can download CycleStreets for Windows Phone 8 from the Windows Phone store. We’ve got more updates coming soon to bring it in line with the app on iOS and Android but please get in touch to let us know what you want to see.

  • Added circular leisure routing
  • Load and save routes for offline use
  • Added a free 24 hour trial
  • Major improvements for location search and general navigation
  • 3D navigation now has 3D buildings visible where available
  • Added share this route option
  • Added feedback form
  • Added rate this app prompt
  • Improvements to tutorial
  • Fixed lots of bugs

 

Leisure route planning   Leisure route display

Thanks again to Dave Conley who has created the app!

LiveRide for CycleStreets Android app

July 21st, 2013

We’re pleased to announce a significant new version of the CycleStreets Android App (version 2.0). It brings a much requested feature – LiveRide sat-nav voice navigation.

LiveRide provides

  • Turn-by-turn voice instructions as you ride
  • Automatic rerouting if you go off course
  • Can run in the background with screen off
  • Option to keep screen on and prevent phone from sleeping

Once you’ve planned a route, simply tap the Start LiveRide button to get going. Once it’s established a GPS lock, it’ll start guiding you on your way. The display shows where you are and your direction of travel. The panel at the top shows the next turn and the distance to it. Your speed is shown at the bottom of the screen.

The padlock icon at the top right controls the screen lock. When locked, the screen will stay on. When unlocked, the phone will turn the screen off as normal. I use a handlebar mount and for short city journeys, I find it useful to keep the screen on. For longer rides, letting the screen turn off as normal helps preserve the battery. I’d also recommend using the off-line map pack too.

Planned route   Live Ride

Unlike many drivers over the past few years the chances of a cyclist getting stuck following satnav directions seem slim but do take care when using LiveRide.

- Jez

We welcome your feedback, especially to report bugs or give us route feedback.

My comments relate to: *






Your comments: *
URL of page: * http://www.cyclestreets.net/footer.html
How did you find out about CycleStreets?:
Your name:
Our ref:

* Items marked with an asterisk [*] are required fields and must be fully completed.