public interface ILcdWMSGetLegendGraphicRequestEncoder
GetLegendGraphic
request.ILcdWMSLegendGraphicRequestEncoder
has a content type that identifies the type of data
encoded by the implementation. This is the MIME - TYPE of the encoded result.
Allowed values are the same as for the FORMAT parameter of the WMS GetMap request. This list contains a number of basic image formats like png and jpeg, but also non image formats like pdf and kml.
The user can select any format from this list as long as the data written to the output stream complies with the expected MIME - TYPE, most clients however offer only support for image formats.ALcdOGCWMSCommandDispatcherFactory.createWMSGetLegendGraphicEncoders(ServletConfig)
and add your encoder to the array that is returned.Modifier and Type | Method and Description |
---|---|
boolean |
encode(TLcdWMSGetLegendGraphicRequestContext aWMSGetLegendGraphicRequestContext,
TLcdWMSRequestContext aWMSRequestContext,
OutputStream aOutputStream)
Encodes the legend graphic for a given layer and sends it to the given
OutputStream . |
String |
getContentType()
Returns the content MIME type of the encoder.
|
String getContentType()
String
.boolean encode(TLcdWMSGetLegendGraphicRequestContext aWMSGetLegendGraphicRequestContext, TLcdWMSRequestContext aWMSRequestContext, OutputStream aOutputStream) throws IOException
OutputStream
.aWMSGetLegendGraphicRequestContext
- a container for all relevant information that might be useful when generating legendsaWMSRequestContext
- a container for the original request and other related request parameters.aOutputStream
- the OutputStream
to write the output to. The type of data is given by getContentType()
.IOException
- for any I/O Exceptions.