OpenLayers.Icon

The icon represents a graphical icon on the screen.  Typically used in conjunction with a OpenLayers.Marker to represent markers on a screen.

An icon has a url, size and position.  It also contains an offset which allows the center point to be represented correctly.  This can be provided either as a fixed offset or a function provided to calculate the desired offset.

Summary
OpenLayers.Icon The icon represents a graphical icon on the screen.
Constructor
OpenLayers.Icon Creates an icon, which is an image tag in a div.
Functions
isDrawn {Boolean} Whether or not the icon is drawn.

Constructor

OpenLayers.Icon

Creates an icon, which is an image tag in a div.

url {String}
size {<OpenLayers.Size>|Object} An OpenLayers.Size or an object with a ‘w’ and ‘h’ properties.
offset {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.
calculateOffset {Function}

Functions

isDrawn

isDrawn: function()

Returns

{Boolean} Whether or not the icon is drawn.

isDrawn: function()
{Boolean} Whether or not the icon is drawn.
Instances of OpenLayers.Marker are a combination of a OpenLayers.LonLat and an OpenLayers.Icon.
Close