Opened 13 years ago
Closed 13 years ago
#853 closed enhancement (fixed)
give each result's extent a different color
Reported by: | jeanpommier | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | v2.7.0 |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Currently, all the results' extents are displayed with the same color. Giving different colors helps identifying what extent goes with which data. (patch and screenshot attached) Some style is added in the Templates, to visually match the extent boxes. TODO : in my patch, the color palette is hard coded, and too short if we choose to display 50 results at a time. Would be better to generate (compute) the palette.
Attachments (4)
Change History (7)
by , 13 years ago
Attachment: | coloredExtents.png added |
---|
by , 13 years ago
Attachment: | coloredExtents.patch added |
---|
comment:1 by , 13 years ago
by , 13 years ago
comment:2 by , 13 years ago
Hi François,
This sounds great ! More flexible and robust than my proposal. Thanks ! I'm OK with it (maybe we should, later, make it customizable via one of the config files ?)
by , 13 years ago
Attachment: | bbox-highlighter-with-colormap.png added |
---|
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Committed revision 8979.
And added to the default app some settings for basic configuration:
GeoNetwork.Settings.results = { // Parameters to set bounding box highlighter colors // Use a custom single color for bounding box featurecolor: 'orange', // Use a random color map with 2 colors //colormap: GeoNetwork.Util.generateColorMap(2), // Use a default color map with 10 colors //colormap: GeoNetwork.Util.defaultColorMap, // Use a custom color map //colormap: ['red', 'green', 'blue'], colormap: undefined, // Use a custom CSS rules //featurecolorCSS: "border-width: 5px;border-style: solid; border-color: ${featurecolor}" featurecolorCSS: undefined };
Thanks for the idea & the patch Jean!
Thanks for the patch Jean.
Here is a slightly modified version for comment with the following changes:
If that sounds good to you, I could add it to trunk.
Some example: