- var history = OSM.History(map),
- note = OSM.Note(map);
-
- OSM.route = OSM.Router(map, {
- "/": OSM.Index(map),
- "/search": OSM.Search(map),
- "/export": OSM.Export(map),
- "/history": history,
- "/new_note": OSM.NewNote(map),
- "/user/:display_name/edits": history,
- "/browse/friends": history,
- "/browse/nearby": history,
- "/browse/note/:id": note,
- "/browse/:type/:id(/history)": OSM.Browse(map)
+ var history = OSM.History(map);
+
+ OSM.router = OSM.Router(map, {
+ "/": OSM.Index(map),
+ "/search": OSM.Search(map),
+ "/directions": OSM.Directions(map),
+ "/export": OSM.Export(map),
+ "/note/new": OSM.NewNote(map),
+ "/history/friends": history,
+ "/history/nearby": history,
+ "/history": history,
+ "/user/:display_name/history": history,
+ "/note/:id": OSM.Note(map),
+ "/node/:id(/history)": OSM.Browse(map, "node"),
+ "/way/:id(/history)": OSM.Browse(map, "way"),
+ "/relation/:id(/history)": OSM.Browse(map, "relation"),
+ "/changeset/:id": OSM.Changeset(map),
+ "/query": OSM.Query(map)