[Cartoweb-users] Implementing a History
sylvain.pasche at camptocamp.com
Thu Jan 19 08:11:38 EST 2006
If you intend to add history capabitlity to CartoWeb, I think it would
be more useful to do it not only for the location plugin, but for the
whole application. This could be done at a higher level than the plugin
level, a bit like Views are handled.
Such a global history mechanism would then allow to go back to a
previous state, keeping not only the location, but also the state of
other plugins like layers, outline, ...
Such a system should offer an option to keep only history for some
plugins like location, which is what you want for instance. Doing so, it
would solve the problem with the views, because Views would still be
snapshot of the current state of the map, and will not store the
previous state at the moment the view is taken.
Of course, this is quite more work than just location history, but it
would offer a more global solution to this problem, and can address a
wider range of possibilities (we could help you in this task, as it
would provide a better user experience for Cartoweb).
I propose you open a feature request about it on bugzilla , and we
continue the discussion there.
Le jeudi 19 janvier 2006 à 13:16 +0100, Dirk Jesko a écrit :
> I have been thinking about extending the Location plugin by some history
> functionality. I am now thinking about the best way to do this. My idea
> was to implement it completely on the client side in about the following
> * store the current bbox during initializeResult() in an array in
> locationState and
> - check that the history does not grow beyond a certain size
> (specified in ini-file)
> - check that the same bbox is not stored consecutively
> - some more integrity test and cleaning ...
> <http://dict.leo.org/se?lp=ende&p=/Mn4k.&search=consecutive>* add two
> buttons, like the pan- or fullExtent-buttons to the template
> * handle the history buttons by issuing BboxLocationRequest
> I would like to know, whether this would be a good way to realize a
> history? One problem that I see with this approach is, that the View
> Plugin stores the current history with a view, since (as far as I
> understand it) the plugin stores/loads the whole locationState object.
> Is there a possibility to load/store views without changing the history
> array inside locationState? Maybe store the history independent of the
> locationState object?
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
More information about the Cartoweb-users