MassGIS / morisoliver

Automatically exported from code.google.com/p/morisoliver
2 stars 2 forks source link

Enlarge OLIVER legend swatches #226

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The swatches in legends used in OLIVER can be a little too small to effectively 
see patterns.  This is the current URL to generate a legend:

http://giswebservices.massgis.state.ma.us/geoserver/wms?TRANSPARENT=TRUE&STYLE=G
ISDATA.SHELLFISHSUIT_POLY%3A%3ADefault&FOO=Shellfish%20Suitability%20Areas&VERSI
ON=1.1.1&SERVICE=WMS&REQUEST=GetLegendGraphic&EXCEPTIONS=application%2Fvnd.ogc.s
e_xml&LAYER=massgis%3AGISDATA.SHELLFISHSUIT_POLY&SCALE=2311168.08719717&FORMAT=i
mage%2Fgif

which results in an image this size: 144px × 200px  (W x H)

There is a way to add WIDTH and HEIGHT parameters to modify that size of the 
legend (as described in 
http://docs.geoserver.org/latest/en/user/services/wms/get_legend_graphic/legendg
raphic.html)

It may make sense to try it like this:

http://giswebservices.massgis.state.ma.us/geoserver/wms?TRANSPARENT=TRUE&STYLE=G
ISDATA.SHELLFISHSUIT_POLY%3A%3ADefault&FOO=Shellfish%20Suitability%20Areas&VERSI
ON=1.1.1&SERVICE=WMS&REQUEST=GetLegendGraphic&EXCEPTIONS=application%2Fvnd.ogc.s
e_xml&LAYER=massgis%3AGISDATA.SHELLFISHSUIT_POLY&SCALE=2311168.08719717&FORMAT=i
mage%2Fgif&HEIGHT=30&WIDTH=30

which results in an image this size: 154px × 300px (W x H)

which is only slightly wider than the original.  If the image is too wide for 
the right window width a horizontal scrollbar will appear which is good. 

I'm not sure if this is workable but it would be nice to experiment. 

Original issue reported on code.google.com by Aleda.Fr...@state.ma.us on 4 Sep 2013 at 1:54

GoogleCodeExporter commented 9 years ago
For now, hardcoded width and height to 30 and 20 in GeoExt.js
Would probably be better with variables but OK for now. 

Original comment by Aleda.Fr...@state.ma.us on 16 Sep 2013 at 8:49

GoogleCodeExporter commented 9 years ago

Original comment by Aleda.Fr...@state.ma.us on 16 Sep 2013 at 8:49