new ol.style.Icon(opt_options) experimental
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Options.
|
Extends
Methods
-
getAnchor(){Array.<number>} experimental
src/ol/style/icon.js, line 178 -
Get the anchor point in pixels. The anchor determines the center point for the symbolizer.
Returns:
Anchor.
-
getImage(pixelRatio){Image|HTMLCanvasElement} experimental
src/ol/style/icon.js, line 225 -
Get the image icon.
Name Type Description pixelRatio
number Pixel ratio.
Returns:
Image or Canvas element.
-
getOpacity(){number} inherited experimental
src/ol/style/image.js, line 54 -
Get the symbolizer opacity.
Returns:
Opacity.
-
getOrigin(){Array.<number>} experimental
src/ol/style/icon.js, line 267 -
Get the origin of the symbolizer.
Returns:
Origin.
-
getRotateWithView(){boolean} inherited experimental
src/ol/style/image.js, line 64 -
Determine whether the symbolizer rotates with the map.
Returns:
Rotate with map.
-
getRotation(){number} inherited experimental
src/ol/style/image.js, line 74 -
Get the symoblizer rotation.
Returns:
Rotation.
-
getScale(){number} inherited experimental
src/ol/style/image.js, line 84 -
Get the symbolizer scale.
Returns:
Scale.
-
getSize(){ol.Size} experimental
src/ol/style/icon.js, line 308 -
Get the size of the symbolizer (in pixels).
Returns:
Size.
-
getSnapToPixel(){boolean} inherited experimental
src/ol/style/image.js, line 94 -
Determine whether the symbolizer should be snapped to a pixel.
Returns:
The symbolizer should snap to a pixel.
-
getSrc(){string|undefined} experimental
src/ol/style/icon.js, line 299 -
Get the image URL.
Returns:
Image src.
-
load() experimental
src/ol/style/icon.js, line 329 -
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.
-
setOpacity(opacity) inherited experimental
src/ol/style/image.js, line 168 -
Set the opacity.
Name Type Description opacity
number Opacity.
-
setRotation(rotation) inherited experimental
src/ol/style/image.js, line 189 -
Set the rotation.
Name Type Description rotation
number Rotation.
-
setScale(scale) inherited experimental
src/ol/style/image.js, line 200 -
Set the scale.
Name Type Description scale
number Scale.
Type Definitions
-
ol.style.Icon.AnchorUnits{string}
-
Icon anchor units. One of 'fraction', 'pixels'.
-
ol.style.Icon.Origin{string}
-
Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.