Yeah, it sounds like we should do the better way, and do the RULE=Classified or whatever if people want to turn it off. And put it in the CITE hacks if it needs to be that way to pass tests.
Are there any advantages to not doing things that way?
Michael Frumin wrote:
[somehow there's 2 threads on this thread. while it seems like we agree, here I bring in the KML situation as well]
wha? it's intentional that there's no title in the legend graphic? The great thing about geoserver is, /unlike/ MapServer, how easy it is to use, how it basically does the right thing out of the box. What use is the legend graphic without a label?
along the same lines, if there is intentionally no title/label in the legend graphic, then what use is the legend=true flag for KML output? It will just draw legend graphics in google earth, but not tell you what they refer to? Seems pretty silly to me:
http://transit.frumin.net/geoserver/wms?VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&SRS=EPSG:4326&STYLES=&TRANSPARENT=FALSE&UNIQUEID=&BBOX=-74.04730987548828,40.54514344465497,-73.70000457763672,40.91540495622394&WIDTH=400&HEIGHT=400&FORMAT=application/vnd.google-earth.kml+XML&KMATTR=FALSE&legend=true&LAYERS=frumin:trx_tracts
http://transit.frumin.net/SLD/trx_tracts.sld
maybe we can add a LegendLabel=true|false flag for use in GetLegendGraphic and WMS/KML requests?
thanks again for everything,
Mike
jdeolive@anonymised.com wrote:
Hi Mike,
We recently redid our GetLegendGraphic code and basically mimicked what
mapserver does. Described in this thread with an example:
http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0405/msg00194.html
If you append RULE=Unclassified for example you don't get the title.
-Justin
Michael Frumin wrote:
Create a layer with an SLD with multiple rules (for different zoom > levels, or different filters, say), with a <Title> and <Name> for each > rule. now do a GetLegendGraphic request for that layer. you get a > sexy-ass legend with an icon and title for each Rule. however, if you > want to pick only one of those Rule's to represent the layer in your > legend, when you add &Rule=RULE, it shows the icon for that rule but the > Title goes away. eg:
http://64.119.128.70/geoserver/wms?VERSION=1.1.0&REQUEST=GetLegendGraphic&LAYER=massgis:GISDATA.COUNTIES_POLY&STYLE=GISDATA.COUNTIES_POLY::Default&WIDTH=16&HEIGHT=16&FORMAT=image/png > <http://64.119.128.70/geoserver/wms?VERSION=1.1.0&REQUEST=GetLegendGraphic&LAYER=massgis:GISDATA.COUNTIES_POLY&STYLE=GISDATA.COUNTIES_POLY::Default&WIDTH=16&HEIGHT=16&FORMAT=image/png>
vs
http://64.119.128.70/geoserver/wms?VERSION=1.1.0&REQUEST=GetLegendGraphic&LAYER=massgis:GISDATA.COUNTIES_POLY&STYLE=GISDATA.COUNTIES_POLY::Default&WIDTH=16&HEIGHT=16&FORMAT=image/png&Rule=Barnstable
<http://64.119.128.70/geoserver/wms?VERSION=1.1.0&REQUEST=GetLegendGraphic&LAYER=massgis:GISDATA.COUNTIES_POLY&STYLE=GISDATA.COUNTIES_POLY::Default&WIDTH=16&HEIGHT=16&FORMAT=image/png&Rule=Barnstable>
(note: I'm linking to the Mass GIS server, but I see the same behavior > of my installation of GeoServer 1.5.1, which they are also using).
thanks,
Mike
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
-- Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com
!DSPAM:4005,4672db6f133273362379201!
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
!DSPAM:4005,4672db6f133273362379201!
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:4005,4672db6f133273362379201!
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org