[openstreetmap-website] Routing (#716)
Richard Fairhurst
notifications at github.com
Sat Mar 8 16:55:35 UTC 2014
This is a basic routing interface for osm.org implemented in JavaScript. Routing is provided by external services (in this commit, OSRM, GraphHopper, and MapQuest Open).
The initial aim is to provide A-B routing functionality with a coherent UI. There is much more that could be implemented, of course, but the focus has been on the simplest possible service for now.
There are two obvious omissions:
- Routes do not have permalinks and the URL history is never changed.
- Directions are not translated.
Both of these are some way outside my knowledge / comfort zone and I suspect others would be more efficient at coding them! Translation is expected to be done by the external service, so should be largely a matter of the routing engine passing the current locale.
Otherwise this should largely be ready. Comments/suggestions *within the existing scope* welcome: "wouldn't it be nice if it did this..." requests are probably best left for after an initial launch.
Thanks hugely to @apmon, @danstowell and @karussell for patches and suggestions so far.
You can merge this Pull Request by running:
git pull https://github.com/systemed/openstreetmap-website routing
Or you can view, comment on it, or merge it online at:
https://github.com/openstreetmap/openstreetmap-website/pull/716
-- Commit Summary --
* Beginning of JavaScript-only routing UI
* Presentation work
* Precompile routing JS
* Presentation of directions
* Query options presentation
* Close directions
* Start to make turn-by-turn instructions clickable
* Show little popup on click
* Start work on second engine
* Move routing engines into their own files
* Simplify usage, fix closures
* Start MapQuest Open support
* Move more engine-specific stuff out of main .js
* Parse MapQuest directions
* Parse CloudMade directions
* Allow user to click Go before geocode result
* Remove logging
* Start work on drag-and-drop start/end markers
* More work on draggable markers
* More draggable routes work
* Add GraphHopper engine (thanks @karussell!)
* Integrate marker & geocoding behaviours
* Apparently 'final' is a reserved word in JS...
* Repair Go button
* Remove a couple of TODOs
* Remove some repeated-query funkiness
* Make more of the javascript routing functions internationalizable
* Merge pull request #6 from apmon/jsroute
* Fiiiix siiiiilly direeeeections
* add a credits line for each routing service
* remove the todo that I addressed
* refresh search if showing and user changes provider
* Merge pull request #10 from danstowell/jsrouting-credits
* Merge pull request #11 from danstowell/jsrouting-pulldownchange
* jsrouting: zoom to bbox on getting fresh geocoded route, but not on drag etc
* Merge pull request #12 from danstowell/jsrouting-bboxzoom
* Reformat string to avoid long line
* fix firefox behaviour when dragging pointer from the tray to the map
* Add spinner while awaiting route
* Improve error-handling
* Merge pull request #13 from danstowell/jsrouting-ffoxdragok
* Use generic GraphHopper engine
* Remove CloudMade foot engine
* Refactor MQ/OSRM engines a la @karussell patch
* Add CORS for engines that support it
* Pass on routing failures from MapQuest
* Put marker at exact position user dragged it to
* Add distance/time summary
* Zoom to fit when submitting form
* Convert tabs to spaces
-- File Changes --
A app/assets/images/routing-sprite.png (0)
A app/assets/images/searching-small.gif (0)
M app/assets/javascripts/index.js (48)
A app/assets/javascripts/routing.js.erb (290)
A app/assets/javascripts/routing_engines/graphhopper.js (63)
A app/assets/javascripts/routing_engines/mapquest.js (81)
A app/assets/javascripts/routing_engines/osrm.js (54)
M app/assets/stylesheets/common.css.scss (59)
M app/views/layouts/_search.html.erb (23)
M config/environments/production.rb (2)
M config/locales/de.yml (32)
M config/locales/en.yml (39)
A vendor/assets/leaflet/leaflet.polyline.js (127)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/716.patch
https://github.com/openstreetmap/openstreetmap-website/pull/716.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/716
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20140308/918ce36b/attachment.html>
More information about the rails-dev
mailing list