Skip to content

GNIP 24 Map Revision History

mbertrand edited this page Jan 26, 2012 · 3 revisions

GNIP 24 - Map Revision History

Overview

Add functionality to record every saved state (viewer JSON) of a map, along with date and the user who saved it. Also add a UI for editors to browse through and view all previously saved versions of the map.

Proposed by

Matt Bertrand

Assigned to Release

TBD.

State

Implemented in WorldMap with a MapSnapshot model: https://github.com/cga-harvard/cga-worldmap/blob/master/src/GeoNodePy/geonode/maps/models.py#L1849

and a UI tool (needs to be refactored to extend gxp.Tool): https://github.com/cga-harvard/geonode-client/blob/master/app/static/script/app/GeoExplorer/MapSnapshotGrid.js

Motivation

Some WorldMap users were frequently making changes to their maps that they later regretted, or several editors working simultaneously on the same map overwrote the other's changes, and they wanted a way to revert back to a previous version.

Proposal

A new MapSnapshot object is created every time a user saves a map. The object records the map's viewer JSON, date created, and id of the user who saved. The map composer toolbar displays a 'Map Revision History' tool for users who have edit permissions. The tool opens a popup window containing a grid showing the revision date and user of every snapshot, sorted by descending date. The date is a link to a URL that displays the map with that snapshot's viewer JSON. Currently the tool loads all snapshots into a grid at once, which can take awhile to load for maps with many saves. Ideally this grid should be paged.

Clone this wiki locally