class Icon extends Symbolizer
A Symbolizer for an external image or glyph.
You can create an Icon from a File/URL/URI and a mime type:
Or with named parameters:def icon = new Icon("images/star.png", "image/png")
def icon = new Icon(format: "image/png", url: "images/star.png")
Fields inherited from class | Fields |
---|---|
class Symbolizer |
filterFactory, styleBuilder, styleFactory, styleOptions, title |
Type | Name and description |
---|---|
java.lang.String |
format The mime type of the image (image/png) |
Expression |
size The size of the Icon (default to -1 which means auto-size) |
java.net.URL |
url The location of the source image |
Type Params | Return Type | Name and description |
---|---|---|
|
protected void |
apply(Symbolizer sym) Apply this Symbolizer to the GeoTools Symbolizer |
|
protected void |
prepare(Rule rule) Prepare the GeoTools Rule by applying this Symbolizer |
|
void |
setFormat(java.lang.String fmt) Set the format |
|
void |
setSize(java.lang.Object size) Set the size of the icon |
|
void |
setUrl(java.lang.Object url) Set the URL |
|
java.lang.String |
toString() The string representation |
Methods inherited from class | Name |
---|---|
class Symbolizer |
and, apply, asSLD, asSLD, buildString, composite, createGeoToolsSymbolizer, getDefault, getDefault, getGeoToolsSymbolizers, getGtStyle, getSld, getTitle, plus, prepare, prepare, range, range, sortBy, sortBy, title, where, zindex |
The mime type of the image (image/png)
The size of the Icon (default to -1 which means auto-size)
The location of the source image
Create a new Icon with named parameters.
def icon = new Icon(format: "image/png", url: "images/star.png")
map
- A Map of named parameters.Create a new Icon.
def icon = new Icon("images/star.png", "image/png")
url
- The file or url of the iconformat
- The image format (image/png)size
- The size of the Icon (default to -1 which means auto-size)Apply this Symbolizer to the GeoTools Symbolizer
sym
- The GeoTools SymbolizerPrepare the GeoTools Rule by applying this Symbolizer
rule
- The GeoTools RuleSet the format
fmt
- The formatSet the size of the icon
size
- The sizeSet the URL
url
- A URL, URI, or FileThe string representation
Groovy Documentation