ALKMaps. | |
Properties | |
fixedRelativePosition | {Boolean} If true, marker postion will be fixed. |
relativePosition | {String} Relative position of the marker (“br”, “tr”, “tl” or “bl”). |
anchor | {Object} Object to which we’ll anchor the marker. |
Constructor | |
ALKMaps. | |
Functions | |
destroy | |
show | Overridden from Marker since user might hide marker and then show() it in a new location (meaning we might want to update the relative position on the show) |
moveTo | We first calculate the new relativePosition, and then we calculate the new px where we will put the marker, based on the new relative position. |
setSize | |
calculateRelativePosition | |
updateRelativePosition | The marker has been moved to a new relative location, so we may want to make some cosmetic adjustments to it. |
calculateNewPx | |
ALKMaps. | Create an anchored marker that is placed on top right side of a location. |
ALKMaps. | Create an anchored marker that is placed on top left side of a location. |
ALKMaps. | Create an anchored marker that is placed on bottom right side of a location. |
ALKMaps. | Create an anchored marker that is placed on bottom left side of a location. |
{Object} Object to which we’ll anchor the marker. Must expose a ‘size’ (ALKMaps.Size) and ‘offset’ (ALKMaps.Pixel).
id | {String} |
lonlat | {ALKMaps.LonLat} |
contentSize | {ALKMaps.Size} |
contentHTML | {String} |
anchor | {Object} Object which must expose a ‘size’ ALKMaps.Size and ‘offset’ ALKMaps.Pixel (generally an ALKMaps.Icon). |
closeBox | {Object} If supplied, it should expose a ‘size’ ALKMaps.Size , ‘displayClass’ {String}, and ‘callback’ {Function}. |
attributes | {Object} Properties for a popup can be added in this. If an attribute is used for clustering, attach it here. |
moveTo: function ( px )
We first calculate the new relativePosition, and then we calculate the new px where we will put the marker, based on the new relative position.
If the relativePosition has changed, we must also call updateRelativePosition() to make any visual changes to the marker which are associated with putting it in a new relativePosition.
px | {ALKMaps.Pixel} |
setSize: function ( contentSize )
contentSize | {ALKMaps.Size} the new size for the marker’s contents div (in pixels). |
calculateRelativePosition: function ( px )
px | {ALKMaps.Pixel} |
{String} The relative position (“br” “tr” “tl” “bl”) at which the marker should be placed.
calculateNewPx: function ( px )
px | {ALKMaps.Pixel} |
{ALKMaps.Pixel} The the new px position of the marker on the screen relative to the passed-in px.
destroy: function ()
Overridden from Marker since user might hide marker and then show() it in a new location (meaning we might want to update the relative position on the show)
show: function ()
We first calculate the new relativePosition, and then we calculate the new px where we will put the marker, based on the new relative position.
moveTo: function ( px )
setSize: function ( contentSize )
calculateRelativePosition: function ( px )
The marker has been moved to a new relative location, so we may want to make some cosmetic adjustments to it.
updateRelativePosition: function ()
calculateNewPx: function ( px )
Create an anchored marker that is placed on top right side of a location.
ALKMaps.Marker2.Anchored.topright = function ( id, lonlat, contentSize, contentHTML, anchor, closeBox, attributes )
Create an anchored marker that is placed on top left side of a location.
ALKMaps.Marker2.Anchored.topleft = function ( id, lonlat, contentSize, contentHTML, anchor, closeBox, attributes )
Create an anchored marker that is placed on bottom right side of a location.
ALKMaps.Marker2.Anchored.bottomright = function ( id, lonlat, contentSize, contentHTML, anchor, closeBox, attributes )
Create an anchored marker that is placed on bottom left side of a location.
ALKMaps.Marker2.Anchored.bottomleft = function ( id, lonlat, contentSize, contentHTML, anchor, closeBox, attributes )