CityCyclingEdinburgh Forum » Infrastructure

Edinburgh Cycle Hire: techie data

(5 posts)

  1. davecykl
    Member

    I am updating the infoscreen in the foyer at my work (powered by the very handy Porteus Kiosk Linux distro), and I want to add, as one of the slides, a map of the cycle hire points nearest us (I have already added BusTracker departures from the nearest bus stops, to try to encourage some further travel shifting).

    Unfortunately, the cycle hire stations web page doesn't seem to update the web address (as OpenStreetMap does) when you move around and zoom in, so it doesn't seem to be possible to load the map as part of a slideshow but centred at a particular location, just by passing URI parameters (or is it, but they are hidden options?).

    I have asked cyclehire_edi and they have suggested that I could use their open data API to extra the data. Although it could make quite a fun mini-project, I'm not sure that I have time to try to put something together to do this.

    I know that some CCE folk have been doing interesting things with the data already: do any of you know if there is an easy way to load up the stations map centred at a particular location?

    Posted 5 years ago #
  2. Snowy
    Member

    Hmm. It says you can use https://edinburghcyclehire:stations/{station-id}
    which will "Opens the map view with the station matching the station-id selected"

    But I've tried pulling station IDs out of the json logs, for example
    https://edinburghcyclehire.com/stations/648

    but it doesn't seem to work. Still playing.

    Posted 5 years ago #
  3. chrisfl
    Member

    Hmmmm this wouldn't be very hard to do. The leaflet library (which OSM uses), can display the map and the stations list can be pulled from the API. If no one else has a solution, I'll see if I can knock something up next week.

    Posted 5 years ago #
  4. davecykl
    Member

    @Snowy: Thanks. Good to know that in theory it should be possible, less good to know that in practice it doesn't seem to work!

    @chrisfl: One of these days I must learn how to Do Interesting Stuff with OSM, unfortunately I just don't have the spare time just now (which is why I was hoping that Edinburgh Cycle Hire would have the map positioning ability built in already...)

    Posted 5 years ago #
  5. Frenchy
    Member

    (I have already added BusTracker departures from the nearest bus stops, to try to encourage some further travel shifting).

    I think we work in the same place, so thanks for doing that!

    (I haven't ever actually used it in anger, as I'm always cycling, but it's still nice to have).

    Posted 5 years ago #

RSS feed for this topic

Reply

You must log in to post.


Video embedded using Easy Video Embed plugin