justb4 / geoext-viewer

Automatically exported from code.google.com/p/geoext-viewer
GNU General Public License v3.0
0 stars 0 forks source link

Pre-configured per-layer legends in Heron Context XML/XSD #406

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Heron already supports  per-Layer pre-configured custom legends where the user 
supplies a link to a legend image. This can be effected via the standard 
OpenLayers 'metadata' config object within an OpenLayers Layer. See for example:

http://lib.heron-mc.org/heron/latest/examples/legendcustom . The parameters is 
as follows:

                   ["OpenLayers.Layer.WMS", "World Map",
                        "http://www2.demis.nl/WMS/wms.asp?WMS=WorldMap",
                        {layers: 'Coastlines', format: 'image/png' },
                        { metadata: {
                            legend: {
                                // Use a fixed URL as legend
                                legendURL: 'legenda-t25raster.png',
                                hideInLegend: false
                            }
                        }
                        }
                    ]

Custom legend configuration  is however not yet possible for Layers defined in 
a Heron Context XML file, such as used with the PDOK project (and pdokviewer 
Heron app). The XSD and handling  needs to be extended to support:

- the 'metadata' object
- the legend element and legendURL

Like:

          <metadata>
               <legend>
                   <legendURL>http://myserver.com/someimage.png</legendURL>
                   <hideInLegend>true|false</hideInLegend>
              </legend>
       </metadata>

In the future more elements will be added to the metadata element (e.g. WFS 
params).  Custom legends need to be available for raster layers: WMS, WMTS and 
TMS. 

Original issue reported on code.google.com by jus...@gmail.com on 18 Nov 2014 at 2:50

GoogleCodeExporter commented 9 years ago
Ok for release 1.0.5 !

Original comment by jus...@gmail.com on 12 Dec 2014 at 1:26