[OpenLayers-Dev] popups

Christopher Schmidt crschmidt at metacarta.com
Sun Apr 27 15:01:13 EDT 2008


On Sun, Apr 27, 2008 at 10:42:51AM -0600, Tim Schaub wrote:
> Hey-
> 
> Can someone describe the following to me:
> 
> 1) OpenLayers.Popup

Simple div. Tied to a lat/lon, not an object. Always opens in a single
direction. Generally not used: doesn't fit itself to the right area of
the map, and doesn't provide a 'pretty' UI.

> 2) OpenLayers.Popup.Anchored

Simple div, tied to an object (like a marker) which provides an
'offset'. The offset is used to place the popup based on the lonlat, and
the offset, based on the preferred relative position -- top left, bottom
right, etc. Thsi is automatically calculated based on where the lonlat
is in the map, designed to open the popup in the directin with the most
space.

> 3) OpenLayers.Popup.AnchoredBubble

Same as above, but with rounded corners using Rico.Corner.

> 4) OpenLayers.Popup.Framed

Base class for image-based popups, which can be fixedRelativePosition or
not. An image (defined in a property of the popup) is used to create the
"GUI" aspect of the popup. A base class, this is never meant to be used
excpet for extension.

> 5) OpenLayers.Popup.FramedCloud

A specific instance of the above: Provides image properties for a popup.


> Seems to me like all popups are "anchored" and I can't tell what is the 
> implied distinction in the words "bubble" and "cloud".

Anchored means 'has an offset, and can be offset relative to the
position of its 'anchor''

> None of the above shed much light on the question "why so many, and 
> which to use when?"  

I don't know if thsi helps at all, but, there it is.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list