| ALKMaps. | |
| Properties | |
| events | {ALKMaps.Events} |
| isBaseLayer | {Boolean} Markers layer is never a base layer. |
| markers | {Array(ALKMaps.Marker2)} internal marker list |
| drawn | {Boolean} internal state of drawing. |
| strategies | {Array(ALKMaps.Strategy)} Optional list of strategies for the layer. |
| Constructor | |
| ALKMaps. | Create a Markers layer. |
| Functions | |
| destroy | |
| afterAdd | Called at the end of the map.addLayer sequence. |
| setOpacity | Sets the opacity for all the markers. |
| moveTo | |
| addMarker | |
| addMarkers | |
| removeMarker | |
| clearMarkers | This method removes all markers from a layer. |
| drawMarker | Calculate the pixel location for the marker, create it, and add it to the layer’s div |
| getDataExtent | Calculates the max extent which includes all of the markers. |
| getViewPortDataExtent | Calculates the max extent which includes all of the markers on the viewport. |
| addMarkerToMapLayerContainerDiv | Add marker. |
| removeMarkerFromMapLayerContainerDiv | Remove marker. |
| setVisibility | Hide or show markers when the layer visibility is changed. |
| isClusterStrategyActive | Return true if there is an active maker2 clustering strategy on the layer. |
layer.events.register(type, obj, listener);
Listeners will be called with a reference to an event object. The properties of this event depends on exactly what happened.
| object | {Object} A reference to layer.events.object. |
| element | {DOMElement} A reference to layer.events.element. |
| beforemarkeradded | Triggered before a marker is added. Listeners will receive an object with a marker property referencing the marker to be added. To stop the marker from being added, a listener should return false. |
| beforemarkersadded | Triggered before an array of markers is added. Listeners will receive an object with a markers property referencing the marker to be added. |
| aftermarkeradded | Triggered after a marker is added. Listeners will receive an object with a marker property referencing the marker to be added. To stop the marker from being added, a listener should return false. |
| aftermarkersadded | Triggered after an array of markers is added. Listeners will receive an object with a markers property referencing the marker to be added. |
| beforemarkerremoved | Triggered before a marker is removed. |
{Array(ALKMaps.Marker2)} internal marker list
{Array(ALKMaps.Strategy)} Optional list of strategies for the layer. Only works with ALKMaps.Marker2.
moveTo:function( bounds, zoomChanged, dragging )
| bounds | {ALKMaps.Bounds} |
| zoomChanged | {Boolean} |
| dragging | {Boolean} |
drawMarker: function( marker )
Calculate the pixel location for the marker, create it, and add it to the layer’s div
| marker | {ALKMaps.Marker} |
addMarkerToMapLayerContainerDiv: function( marker )
Add marker. Only works with ALKMaps.Marker2.
removeMarkerFromMapLayerContainerDiv: function( marker )
Remove marker. Only works with ALKMaps.Marker2.
setVisibility: function( visibility )
Hide or show markers when the layer visibility is changed. Only works with ALKMaps.Marker2.
destroy: function()
Called at the end of the map.addLayer sequence.
afterAdd: function()
Sets the opacity for all the markers.
setOpacity: function( opacity )
moveTo:function( bounds, zoomChanged, dragging )
addMarker: function( marker, options )
addMarkers: function( markers, options )
removeMarker: function( marker, options )
This method removes all markers from a layer.
clearMarkers: function()
Calculate the pixel location for the marker, create it, and add it to the layer’s div
drawMarker: function( marker )
Calculates the max extent which includes all of the markers.
getDataExtent: function ()
Calculates the max extent which includes all of the markers on the viewport.
getViewPortDataExtent: function ()
Add marker.
addMarkerToMapLayerContainerDiv: function( marker )
Remove marker.
removeMarkerFromMapLayerContainerDiv: function( marker )
Hide or show markers when the layer visibility is changed.
setVisibility: function( visibility )
Return true if there is an active maker2 clustering strategy on the layer.
isClusterStrategyActive: function()