There needs to be some scheme for URL persistency, covering all the various interaction controls, so that someone will be able to construct a view, and then the URL without needing any special action.
User actions which should result in different URLs are:
Enabling/disabling various layers
Setting various options in the layer(s). This could potentially be quite a long list.
Drawing a boundary (or in future boundaries potentially)
Panning the map (though there is a Leaflet.js plugin which attaches the location as a hash, so that is already fine)
There is already some work in place which allows the key thing - layers, to be set, e.g.
/collisions
/cycleparking,planningapplications (which would enable both)
However, these two are not enough because of the layer options requirement, and that could generate long URLs.
One approach is that every interaction results in an AJAX request for a shortlink, e.g. /msln648a though this isn't very self-explanatory. It would need a server-side database storage and could generate a lot of items in the database that are never used. This could be optimised by re-using existing combinations. E.g. common use case might be collisions (with type=serious) plus pollution. That combination could then be re-used each time.
This will almost certainly need to involve the HTML5 push/history API, so that the URL changes dynamically, and not a require a "get permalink" control which most people would miss:
http://html5doctor.com/history-api/
There needs to be some scheme for URL persistency, covering all the various interaction controls, so that someone will be able to construct a view, and then the URL without needing any special action.
User actions which should result in different URLs are:
There is already some work in place which allows the key thing - layers, to be set, e.g. /collisions /cycleparking,planningapplications (which would enable both)
However, these two are not enough because of the layer options requirement, and that could generate long URLs.
One approach is that every interaction results in an AJAX request for a shortlink, e.g. /msln648a though this isn't very self-explanatory. It would need a server-side database storage and could generate a lot of items in the database that are never used. This could be optimised by re-using existing combinations. E.g. common use case might be collisions (with type=serious) plus pollution. That combination could then be re-used each time.
This will almost certainly need to involve the HTML5 push/history API, so that the URL changes dynamically, and not a require a "get permalink" control which most people would miss: http://html5doctor.com/history-api/