new Icon(opt_options)
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Options.
|
Extends
Methods
-
Clones the style. The underlying Image/HTMLCanvasElement is not cloned.
Returns:
The cloned style.
-
getAnchor(){Array.<number>}
style/Icon.js, line 230 -
Get the anchor point in pixels. The anchor determines the center point for the symbolizer.
Returns:
Anchor.
-
Get the icon color.
Returns:
Color.
-
Get the image icon.
Name Type Description pixelRatio
number Pixel ratio.
Returns:
Image or Canvas element.
-
Get the symbolizer opacity.
Returns:
Opacity.
-
getOrigin(){Array.<number>}
style/Icon.js, line 334 -
Get the origin of the symbolizer.
Returns:
Origin.
-
Determine whether the symbolizer rotates with the map.
Returns:
Rotate with map.
-
Get the symoblizer rotation.
Returns:
Rotation.
-
Get the symbolizer scale.
Returns:
Scale.
-
Get the size of the symbolizer (in pixels).
Returns:
Size.
-
getSrc(){string|undefined}
style/Icon.js, line 365 -
Get the image URL.
Returns:
Image src.
-
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 277 -
Set the anchor point. The anchor determines the center point for the symbolizer.
Name Type Description anchor
Array.<number> Anchor.
-
Set the opacity.
Name Type Description opacity
number Opacity.
-
Set whether to rotate the style with the view.
Name Type Description rotateWithView
boolean Rotate with map.
-
Set the rotation.
Name Type Description rotation
number Rotation.
-
Set the scale.
Name Type Description scale
number Scale.