OpenLayers. Popup. Anchored

Inherits from

Summary
Since the popup is moving to a new px, it might need also to be moved relative to where the marker is.

Constructor

OpenLayers. Popup. Anchored

Parameters

id{String}
lonlat{OpenLayers.LonLat}
size{OpenLayers.Size}
contentHTML{String}
anchor{Object} Object which must expose a ‘size’ OpenLayers.Size and ‘offset’ OpenLayers.Pixel (generally an OpenLayers.Icon).
closeBox{Boolean}

Functions

draw

draw: function(px)

Parameters

px{OpenLayers.Pixel}

Returns

{DOMElement} Reference to a div that contains the drawn popup.

calculateRelativePosition

calculateRelativePosition:function(px)

Parameters

px{OpenLayers.Pixel}

Returns

{String} The relative position (“br” “tr” “tl “bl”) at which the popup should be placed.

moveTo

moveTo: function(px)

Since the popup is moving to a new px, it might need also to be moved relative to where the marker is.

Parameters

px{OpenLayers.Pixel}

setSize

setSize:function(size)

Parameters

size{OpenLayers.Size}

calculateNewPx

calculateNewPx:function(px)

Parameters

px{OpenLayers.Pixel}

Returns

{OpenLayers.Pixel} The the new px position of the popup on the screen relative to the passed-in px.

draw: function(px)
calculateRelativePosition:function(px)
moveTo: function(px)
Since the popup is moving to a new px, it might need also to be moved relative to where the marker is.
setSize:function(size)
calculateNewPx:function(px)
A popup is a small div that can opened and closed on the map.
This class represents a longitude and latitude pair
Instances of this class represent a width/height pair
This class represents a screen coordinate, in x and y coordinates
The icon represents a graphical icon on the screen.