OpenLayers. Layer. Markers

Inherits from

Summary
{Boolean} Markers layer is never a base layer.
Array({OpenLayers.Marker}) internal marker list
{Boolean} internal state of drawing.
Create a Markers layer.
clear all the marker div’s from the layer and then redraw all of them.
Private.

Properties

isBaseLayer

{Boolean} Markers layer is never a base layer.

markers

Array({OpenLayers.Marker}) internal marker list

drawn

{Boolean} internal state of drawing.  This is a workaround for the fact that the map does not call moveTo with a zoomChanged when the map is first starting up.  This lets us catch the case where we have never drawn the layer, and draw it even if the zoom hasn’t changed.

Functions

OpenLayers. Layer. Markers

Create a Markers layer.

Parameters

name{String}
options{Object} Hashtable of extra options to tag onto the layer

destroy

destroy: function()

moveTo

moveTo:function(bounds,
zoomChanged,
dragging)

Parameters

bounds{OpenLayers.Bounds}
zoomChanged{Boolean}
dragging{Boolean}

addMarker

addMarker: function(marker)

Parameters

marker{OpenLayers.Marker}

removeMarker

removeMarker: function(marker)

Parameters

marker{OpenLayers.Marker}

clearMarkers

clearMarkers: function()

redraw

redraw: function()

clear all the marker div’s from the layer and then redraw all of them.  Use the map to recalculate new placement of markers.

drawMarker

drawMarker: function(marker)

Private.  Calculate the pixel location for the marker, create it, and add it to the layer’s div

Parameters

marker{OpenLayers.Marker}
Instances of OpenLayers.Marker are a combination of a OpenLayers.LonLat and an OpenLayers.Icon.
destroy: function()
moveTo:function(bounds,
zoomChanged,
dragging)
addMarker: function(marker)
removeMarker: function(marker)
clearMarkers: function()
redraw: function()
clear all the marker div’s from the layer and then redraw all of them.
drawMarker: function(marker)
Private.
Instances of this class represent bounding boxes.