[maps.soton] Bus Functionality
Christopher Baines
cb15g11 at ecs.soton.ac.uk
Sat Mar 21 17:05:56 GMT 2015
Back at the end of the summer, I had written some bus stuff for
leaflet-soton, but it was not quite ready to be shipped. I have just
been looking at what I think would need doing before I would consider it
ready, mostly as I would like to see it deployed so that the effort I
spent on it would be more worthwhile.
At [4], you can see something similar (might be just behind, as it does
not automatically update) to the current master branch in the repository
[2]. It has a "Bus Routes" button at the top. When selected, this brings
up a sidebar. Using this, you can select bus routes, which will show the
route on the map, and display the list of stops. You can hover over
stops to highlight them, and click them to center the map on them.
In terms of behavior, this has not changed much, but I have done lots of
refactoring of the code (moved it all to leaflet-soton/leaflet-route).
This refactoring has also allowed for properly writing a bus stop popup.
Previously, this displayed a list of routes, and an iframe for a
relevant page on bus.southampton.ac.uk. Now it fetches the json data
from bus.southampton.ac.uk, and renders a more integrated interface. The
bus.southampton.ac.uk site does not currently have CORS (Cross-origin
resource sharing) enabled, so this will not work on [4], but I have
attached a screenshot. I have been using the corsproxy utility to
develop/test this.
I think there is probably more room for improvement with this, as the
destination is duplicated, but that has only just occurred to me.
I am going to try and work on the tasks listed below over the next ~4
weeks. If anyone is interested in also doing anything with any of the
projects mentioned, just let me know such that some coordination can occur.
Main tasks:
===========
- Workaround/fix a known issue with Leaflet.TextPath [5], this can
render the map unusable on at least Chromium, and the standard Android
web browser. I believe it should be possible to work around this by
sorting the layers carefully.
- Get bus stop stuff working properly in uos-live.js, either by
enabling CORS or using a different data source
Lower priority tasks:
=====================
- Add support for a strict polling interval (currently it polls
somewhat randomly) in pollymer (library used in uos-live.js)
- Move the fetching workstation data to uos-live.js
- Improve the route selection user interface (the user interface does
not respond when you highlight a bus route)
- Handle failure to fetch bus data in the bus popups user interface
1: http://git.cbaines.net/leaflet-soton/
2: http://git.cbaines.net/maps.southampton.ac.uk/
3: http://git.cbaines.net/uos-live.js/
4: http://cbaines.net/soton
(short for http://cbaines.net/maps.southampton.ac.uk/)
5: https://github.com/makinacorpus/Leaflet.TextPath/issues/22
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bus-stop-popup.png
Type: image/png
Size: 130636 bytes
Desc: not available
Url : http://mailman.ecs.soton.ac.uk/pipermail/maps.soton/attachments/20150321/d3414d92/attachment-0001.png
More information about the maps.soton
mailing list