public class Icon extends Image
| Modifier and Type | Class and Description |
|---|---|
static class |
Icon.Origin
Enumeration of value anchor origin values.
|
static class |
Icon.Unit
Enumeration of valid units by which the anchor's "X" or "Y" value is specified.
|
| Modifier and Type | Field and Description |
|---|---|
static Coordinate |
DEFAULT_COORDINATE
Default anchor coordinate for new instances (center the icon relative to the feature).
|
counter, JS_GLOBAL, objectIds| Constructor and Description |
|---|
Icon(Coordinate anchor,
Icon.Origin anchorOrigin,
Icon.Unit anchorXUnits,
Icon.Unit anchorYUnits,
Number opacity,
String src,
CorsPolicy crossOrigin)
Creates a new instance.
|
Icon(Coordinate anchor,
String src)
Creates a new instance.
|
Icon(String src)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Icon |
anchor(Coordinate anchor)
Sets the anchor's coordinate.
|
Icon |
anchorOrigin(Icon.Origin anchorOrigin)
Sets the position of the anchor relative to the feature.
|
Icon |
anchorXUnits(Icon.Unit anchorXUnits)
Sets the unit for calculating the anchor's "X" position.
|
Icon |
anchorYUnits(Icon.Unit anchorYUnits)
Sets the unit for calculating the anchor's "Y" position.
|
Icon |
crossOrigin(CorsPolicy crossOrigin)
Sets the CORS (Cross Origin Resource Sharing) policy for this icon.
|
Coordinate |
getAnchor()
Returns the anchor's coordinate.
|
Icon.Origin |
getAnchorOrigin()
Sets the position of the anchor relative to the feature.
|
Icon.Unit |
getAnchorXUnits()
Returns the unit for calculating the anchor's "X" position.
|
Icon.Unit |
getAnchorYUnits()
Returns the unit for calculating the anchor's "Y" position.
|
CorsPolicy |
getCrossOrigin()
Returns the CORS (Cross Origin Resource Sharing) policy for this icon.
|
String |
getJsType()
Returns a String with the type of Javascript object that this object represents.
|
Number |
getOpacity()
Returns the opacity of the icon.
|
String |
getSrc()
Returns the URL is the image for the icon.
|
Icon |
opacity(Number opacity)
Sets the opacity of the icon.
|
String |
renderJs()
Returns a String with containing the rendered Javascript code for this object.
|
Icon |
rotation(Number number)
Sets the rotation of the image.
|
Icon |
scale(Number scale)
Sets the scale of the image.
|
void |
setAnchor(Coordinate anchor)
Sets the anchor's coordinate.
|
void |
setAnchorOrigin(Icon.Origin anchorOrigin)
Sets the position of the anchor relative to the feature.
|
void |
setAnchorXUnits(Icon.Unit anchorXUnits)
Sets the unit for calculating the anchor's "X" position.
|
void |
setAnchorYUnits(Icon.Unit anchorYUnits)
Sets the unit for calculating the anchor's "Y" position.
|
void |
setCrossOrigin(CorsPolicy crossOrigin)
Sets the CORS (Cross Origin Resource Sharing) policy for this icon.
|
void |
setOpacity(Number opacity)
Sets the opacity of the icon.
|
void |
setSrc(String src)
Sets the URL with the image for the icon.
|
Icon |
src(String src)
Sets the URL with the image for the icon.
|
getRotation, getScale, renderAttributesJs, setRotation, setScaleescapeQuoteJs, getJsId, getJsIdWithSuffixpublic static final Coordinate DEFAULT_COORDINATE
public Icon(String src)
src - String with the URL for the image for this iconpublic Icon(Coordinate anchor, String src)
anchor - Anchor position for this iconsrc - String with the URL for the image for this iconpublic Icon(Coordinate anchor, Icon.Origin anchorOrigin, Icon.Unit anchorXUnits, Icon.Unit anchorYUnits, Number opacity, String src, CorsPolicy crossOrigin)
anchor - Anchor position for this iconanchorOrigin - Position of the anchor relative to the featureanchorXUnits - Unit for calculating the anchor's "X" positionanchorYUnits - Unit for calculating the anchor's "Y" positionopacity - Opacity of the iconsrc - String with the URL for the image for this iconcrossOrigin - CORS policypublic Coordinate getAnchor()
public void setAnchor(Coordinate anchor)
anchor - New valuepublic Icon anchor(Coordinate anchor)
anchor - New valuepublic Icon.Origin getAnchorOrigin()
public void setAnchorOrigin(Icon.Origin anchorOrigin)
anchorOrigin - New valuepublic Icon anchorOrigin(Icon.Origin anchorOrigin)
anchorOrigin - New valuepublic Icon.Unit getAnchorXUnits()
public void setAnchorXUnits(Icon.Unit anchorXUnits)
anchorXUnits - public Icon anchorXUnits(Icon.Unit anchorXUnits)
anchorXUnits - New valuepublic Icon.Unit getAnchorYUnits()
public void setAnchorYUnits(Icon.Unit anchorYUnits)
anchorYUnits - New valuepublic Icon anchorYUnits(Icon.Unit anchorYUnits)
anchorYUnits - New valuepublic Number getOpacity()
public void setOpacity(Number opacity)
opacity - New valuepublic Icon opacity(Number opacity)
opacity - New valuepublic String getSrc()
public void setSrc(String src)
src - New valuepublic Icon src(String src)
src - New valuepublic CorsPolicy getCrossOrigin()
public void setCrossOrigin(CorsPolicy crossOrigin)
crossOrigin - CORS policypublic Icon crossOrigin(CorsPolicy crossOrigin)
crossOrigin - CORS policypublic Icon rotation(Number number)
Imagepublic Icon scale(Number scale)
Imagepublic String getJsType()
JavascriptObjectgetJsType in interface IJavascriptObjectgetJsType in class Imagepublic String renderJs()
JavascriptObjectrenderJs in interface IJavascriptObjectrenderJs in class ImageCopyright © 2015. All rights reserved.