OpenLayers. Marker

Instances of OpenLayers.Marker are a combination of a OpenLayers.LonLat and an OpenLayers.Icon.

Summary
Instances of OpenLayers.Marker are a combination of a OpenLayers.LonLat and an OpenLayers.Icon.
{OpenLayers.Icon}
{OpenLayers.LonLat} location of object
Calls draw on the icon, and returns that output.
Move the marker to the new location.
{Boolean} Whether or not the marker is currently visible on screen.
Change the opacity of the marker by changin the opacity of its icon
Hide or show the icon
Creates a default OpenLayers.Icon.

Properties

icon

{OpenLayers.Icon}

lonlat

{OpenLayers.LonLat} location of object

Functions

OpenLayers. Marker

Paraemeters

icon{OpenLayers.Icon}
lonlat{OpenLayers.LonLat}

draw

draw: function(px)

Calls draw on the icon, and returns that output.

Parameters

px{OpenLayers.Pixel}

Return

{DOMElement} A new DOM Image with this marker’s icon set at the location passed-in

moveTo

moveTo: function (px)

Move the marker to the new location.

Parameters

px{OpenLayers.Pixel}

onScreen

onScreen:function()

Return

{Boolean} Whether or not the marker is currently visible on screen.

inflate

inflate: function(inflate)

Parameters

inflate{float}

setOpacity

setOpacity: function(opacity)

Change the opacity of the marker by changin the opacity of its icon

Parameters

opacity{float} Specified as fraction (0.4, etc)

display

display: function(display)

Hide or show the icon

display{Boolean}

defaultIcon

OpenLayers.Marker.defaultIcon = function()

Creates a default OpenLayers.Icon.

Returns

{OpenLayers.Icon} A default OpenLayers.Icon to use for a marker

This class represents a longitude and latitude pair
Instances of OpenLayers.Map are interactive maps embedded in a web page.
draw: function(px)
Calls draw on the icon, and returns that output.
moveTo: function (px)
Move the marker to the new location.
onScreen:function()
{Boolean} Whether or not the marker is currently visible on screen.
inflate: function(inflate)
setOpacity: function(opacity)
Change the opacity of the marker by changin the opacity of its icon
display: function(display)
Hide or show the icon
OpenLayers.Marker.defaultIcon = function()
Creates a default OpenLayers.Icon.