public interface ExternalGraphic extends ExternalGraphic, Symbol
The details of this object are taken from the OGC Styled-Layer Descriptor Report (OGC 02-070) version 1.0.0.:
<xsd:element name="ExternalGraphic">
<xsd:annotation>
<xsd:documentation>
An "ExternalGraphic" gives a reference to an external raster or
vector graphical object.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="sld:OnlineResource"/>
<xsd:element ref="sld:Format"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Renderers can use this information when displaying styled features, though it must be remembered that not all renderers will be able to fully represent strokes as set out by this interface. For example, opacity may not be supported.
Notes:
Modifier and Type | Field and Description |
---|---|
static ExternalGraphic[] |
EXTERNAL_GRAPHICS_EMPTY |
SYMBOLS_EMPTY
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
getCustomProperties()
Custom user supplied properties available when working with an external graphic.
|
URL |
getLocation()
Provides the URL for where the external graphic resource can be located.
|
String |
getURI()
Returns the un-parsed URI for the mark (useful if the uri is using transformations or
relative locations)
|
void |
setCustomProperties(Map<String,Object> properties)
Custom properties; renderer may consult these values when drawing graphic.
|
void |
setFormat(String format)
Provides the format of the external graphic.
|
void |
setLocation(URL url)
Provides the URL for where the external graphic resource can be located.
|
void |
setURI(String uri)
Converts a URI in a string to the location URL
|
accept, getColorReplacements, getFormat, getInlineContent, getOnlineResource
static final ExternalGraphic[] EXTERNAL_GRAPHICS_EMPTY
void setURI(String uri)
uri
- the uri of the external graphicString getURI()
uri
- URL getLocation() throws MalformedURLException
This method will be replaced by getOnlineResource().getLinkage() in 2.6.x
MalformedURLException
- If the url held in the ExternalGraphic is malformed.void setLocation(URL url)
url
- The URL of the ExternalGraphicvoid setFormat(String format)
format
- The format of the external graphic. Reported as its MIME type in a String
object.void setCustomProperties(Map<String,Object> properties)
The default GeoTools renderer uses the following:
properties
- Copyright © 1996–2019 Geotools. All rights reserved.