new Icon(opt_options)
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Options.
|
Methods
-
Clones the style. The underlying Image/HTMLCanvasElement is not cloned.
Returns:
The cloned style.
-
getAnchor()
style/Icon.js, line 243 -
-
Get the icon color.
Returns:
Color.
-
getImage(pixelRatio){HTMLImageElement|HTMLCanvasElement}
style/Icon.js, line 311 -
Get the image icon.
Name Type Description pixelRatio
number Pixel ratio.
Returns:
Image or Canvas element.
-
getOrigin()
style/Icon.js, line 347 -
-
getSize()
style/Icon.js, line 386 -
-
getSrc(){string|undefined}
style/Icon.js, line 378 -
Get the image URL.
Returns:
Image src.
-
load()
style/Icon.js, line 406 -
Load not yet loaded URI. When rendering a feature with an icon style, the vector renderer will automatically call this method. However, you might want to call this method yourself for preloading or other purposes.
-
setAnchor(anchor)
style/Icon.js, line 290 -
Set the anchor point. The anchor determines the center point for the symbolizer.
Name Type Description anchor
Array.<number> Anchor.