Class: Icon

cercalia.Icon

The cercalia.Marker can contain icons. This icons can be created using this class. This icon can include rotation, transparency.
If icon option is not included in the cercalia.Marker constructor, by default cercalia API use the icon.

new cercalia.Icon(options)

Name Type Description
options cercaliax.IconOptions

Methods

staticcercalia.Icon.createDefault()

Default icon

getAnchor(){number}

Returns:
opacity Return icon anchor

getClass(){string}

Returns:
object ClassName

getIconStyle(){ol.style.Icon}

getOpacity(){number}

Returns:
opacity Image opacity.

getRotation(){number}

Returns:
Icon rotation (degrees).

getSize(){Array.<number>}

Returns:
size

getSrc(){string}

Returns:
Image URL

setAnchor(opacity)

Set icon anchor

Name Type Description
opacity number

Opacity.

setOpacity(opacity)

Returns the icon image source

Name Type Description
opacity number

Opacity.

setRotation(rotation)

Apply a rotation, degrees.

Name Type Description
rotation string

degrees rotation.

setSize(size)

Name Type Description
size Array.<number>

Size image source.

Deprecated
  • Yes

setSrc(src)

Assign the icon image source

Name Type Description
src string

Image URL.