Closed GoogleCodeExporter closed 9 years ago
We have a first rough implementation, example:
http://lib.heron-mc.org/heron/latest/examples/shortcuts
One can add User bookmarks in addition to bookmarks pre-configured. User
bookmarks are saved in HTML5 Local Storage (IE8 or higher required). User
Bookmarks can also be deleted within the Shortcuts Panel.
The interesting case is now: as local storage is tied to an internet domain
name, e.g. http://lib.heron-mc.org, User bookmarks will also show up in other
pages within that domain. WIthin these pages the projection or layers may not
be present. For example when going from example to the "default" example at :
http://lib.heron-mc.org/heron/latest/examples/default. Options IMO:
1- tie bookmarks to page path (tricky as page may be accessed under several
paths e.g. /default or /default/ or /default/index.html)
2- grey out bookmarks on pages where they do not apply (layer, projection,
extent mismatch).
3- just ignore
My suggestion is option 2).
Original comment by jus...@gmail.com
on 19 Mar 2013 at 3:33
Looks good. Option 2 should be fine; Would the greyed out bookmarks still be
clickable? I think they should be - all the layers may not match but the
location may still be of use for instance. For us at least everything is going
to be in the same projection so it will just be layers not showing.
I like the Description touch.
Bug:
- I created a long "name" "floccinaucinihilipilification
floccinaucinihilipilification" this showed up fine, but when I deleted it,
only the top line was removed.
Requests:
- Per my screenshot, can we have some text for Project bookmarks and user ones
please.
- Is it possible to stick a couple of pixels of padding between each bookmark?
It will make them more readable.
Original comment by jonathan...@warwickshire.gov.uk
on 19 Mar 2013 at 4:06
Anke, I'll also make you issue-owner. that is always the person solving/coding
the issue.
Original comment by jus...@gmail.com
on 21 Mar 2013 at 6:04
The implementation of user bookmarks has been modified.
1. There is a better visual segregation between server and user bookmarks.
2. There is some space between the bookmarks now.
3. User bookmarks are being validated now on presents of layers, map units, map
projection and center within the maxExtent of the map. If not valid, the
bookmark will show grey.
I could not reproduce the bug reported with a long name, deleting the bookmark
only removes the top line. Which browser are jou using, Jonathan?
Original comment by Ankeu...@gmail.com
on 25 Mar 2013 at 10:46
Good you store also the projection. Grayed bookmarks work for me. There is also
an issue 174, to allow bookmarks with other projections. Not required for now,
but handy later.
I have two suggestions for the technical implementation of bookmarks:
1. storage format: LocalStorage uses key,value as strings. The current
bookmark-implementation uses an encoding with #,# to store a "record" as a
string. This may not be future-proof when we extend Bookmarks. As the bookmark
data is a Javascript object, my suggestion is to store the bookmark data as
a JSON object, possibly with a type and version number for future compat. A
JSON object can easily be created by using a "stringify()' method on any
JavaScript object. I can add the JSON util to the Heon Utils.js.
2. A minor suggestion is to use Ext XTemplate for the Panel HTML, but we can do
this later.
Original comment by jus...@gmail.com
on 26 Mar 2013 at 10:34
The projection is only stored in the user bookmarks for now. Also only the user
bookmarks are validated. But this can easily be for the server bookmarks as
well.
Storing the bookmark data as a JSON object is a great suggestion. I will
implement that after the JSON util after you've added the JSON util to the
Heron Utils.js.
Original comment by Ankeu...@gmail.com
on 26 Mar 2013 at 10:53
Ankeur - The bug happens in Chrome only. Create a couple of bookmarks with a
name of "floccinaucinihilipilification floccinaucinihilipilification
floccinaucinihilipilification" and you'll see it.
Doesn't seem to happen in Firefox, Opera, or IE.
Original comment by jonathan...@warwickshire.gov.uk
on 26 Mar 2013 at 11:03
@Ankeur16 - I just researched: JSON.stringify() is already natively available
in all major browsers, including IE8 and up. See also
http://www.json.org/js.html . To decode use JSON.parse() not eval().
LocalStorage is really cool, we can do more stuff, like having a "current
mapping context", when you return to the same site you will go into your last
mapping context. Not to implement now, but as a thought.
Once we have JSON objects we can store more elaborate structures, maybe even
full OGC WMC ViewContexts, supported by OL. See example
http://openlayers.org/dev/examples/wmc.html (press "write" button to see WMC
doc.).
As said, put a type-filed (like type: 'shortcut', and version number (like
version: 1) in your JSON struct. Then we can always be compatible and evolve.
Original comment by jus...@gmail.com
on 26 Mar 2013 at 12:32
JSON.stringify... folks, why don't you just use Ext.encode/Ext.decode? :-)
Original comment by martin.k...@gmail.com
on 26 Mar 2013 at 3:42
@Martin - Good suggestion, overlooked; actually Ext.encode() will call
JSON.stringify() if natively available!
Original comment by jus...@gmail.com
on 26 Mar 2013 at 4:54
While reviewing submissions for FOSS4G, one of them ("Story of the Map") is
about OGC WMC ViewContexts:
---
Paul van Genuchten, Geocat bv
Anton Bakker, GeoCat bv
Last years we’ve seen quite some products offering users the possibility to
stack a set of layers and share it with others. Since a wms-layer doesn’t
have a story, until you combine it with other data (and zoom to an extent).
Products like Mapstory, Storymap, Geonode, Tilemill and more all offer similar
functionality, but each uses its’ own proprietary format. This unfortunately
prevents the maps to be exchangeable. The use case is there! Consider a map
being created in Geonode, save it and open it in QGis. All this happened while
an OGC standard has been out there for quite a while, the WMC standard. Soon to
be replaced by OWSContext. For sure the standard doesn’t manage all tiny
details in maps, but it offers extension points, where one can insert any
custom map and layer attributes. In geonetwork we gladly support the WMC
format. In the Geonetwork Mapviewer you are able to create, open and save WMC
documents. In near future one can attach a WMC to an iso19139 record to share
the map in the catalogue. Users will be able to open the map in the catalogue
and even embed it in a website.
-----
Maybe Heron can be ahead of the curve on this one. I have to admit I'd never
head of them before this! Go Heron. :-)
(was this in 0.72? Or should it be updated to 0.73)
Original comment by jonathan...@warwickshire.gov.uk
on 16 Apr 2013 at 3:42
Ha! These two gentlemen are very familiar: GeoCat is OpenGeoGroep member
and I have worked closely with and for GeoCat/GeoNetwork, I speak Paul
weekly through OSGeo.nl... Coincidence? 300 FOSS4G submissions I heard.
Thanks. Actually I considered WMC for bookmarks, well even for
configuration, this could be a next step. OTOH WMC is also quite complex
standard. Geonetwork MapViewer is based on GeoExt/OpenLayers as well...
Thanks for the heads up.
Original comment by jus...@gmail.com
on 16 Apr 2013 at 4:05
set rel to 0.73
Original comment by jus...@gmail.com
on 16 Apr 2013 at 6:00
[deleted comment]
(edited)
Bug (using 0.72):
User is allowed to leave the name of one of their bookmarks "blank". As its the
title that's clickable, this means the user can never click on their bookmark.
However, the first bookmark is treated properly ("add" is greyed out).
Subsequent ones created during the same session exhibit this.
Original comment by jonathan...@warwickshire.gov.uk
on 17 Apr 2013 at 1:56
Could we change the icon? The grey link being used is typically associated with
hyperlinks.
Looking at my four web-browsers, they all seem to use a gold-star for bookmarks
(finally, a standard they all agree on! :-) ).
We can get free, open icons from here: http://openiconlibrary.sourceforge.net/
-
Maybe this one -
http://openiconlibrary.sourceforge.net/gallery2/?./Icons/emblems/emblem-special.
png
Original comment by jonathan...@warwickshire.gov.uk
on 17 Apr 2013 at 2:18
Comments 15 and 16 should be solved: see example:
http://lib.heron-mc.org/heron/latest/examples/bookmarks/
Original comment by jus...@gmail.com
on 17 Apr 2013 at 3:24
Yep. Thanks!
Original comment by jonathan...@warwickshire.gov.uk
on 17 Apr 2013 at 3:26
Closing as by user acceptance.
Original comment by jus...@gmail.com
on 23 Apr 2013 at 9:58
Original issue reported on code.google.com by
jonathan...@warwickshire.gov.uk
on 19 Feb 2013 at 1:26Attachments: