- var expiry = new Date();
- expiry.setYear(expiry.getFullYear() + 10);
- $.cookie("_osm_location", cookieContent(this), { expires: expiry });
-}
-
-function setPositionLink(map) {
- return function(e) {
- var data = $(this).data(),
- center = L.latLng(data.lat, data.lon);
-
- if (data.minLon && data.minLat && data.maxLon && data.maxLat) {
- map.fitBounds([[data.minLat, data.minLon],
- [data.maxLat, data.maxLon]]);
- } else {
- map.setView(center, data.zoom);
- }
+ 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)
+ });