A popup is a small div that can opened and closed on the map. Typically opened in response to clicking on a marker. See OpenLayers.Marker. Popups don’t require their own layer and are added the the map using the OpenLayers.Map.addPopup method.
popup = new EMS.Popup("chicken",
new OpenLayers.LonLat(5,40),
new OpenLayers.Size(200,200),
"example popup",
marker.icon,
true);
map.addPopup(popup);| EMS. | A popup is a small div that can opened and closed on the map. |
| Constants | |
| EVENT_TYPES | {Array} Supported application event types. |
| CLOSE_SIZE | {OpenLayers.Size} the size of the close button. |
| CLOSE_IMAGE | {String} path of the close button image. |
| CALLOUT_SIZE | {OpenLayers.Size} is the size of the left and right callout arrows. |
| CALLOUT_LEFT_IMAGE | {String} path of the left callout image. |
| CALLOUT_RIGHT_IMAGE | {String} path of the right callout image. |
| Properties | |
| events | {OpenLayers.Events} events object to be used when attaching custom events handlers to this object. |
| id | {String} Prefix to the div.id attribute. |
| lonlat | {EMS.LonLat} Prefix to lonlat field |
| padding | {Number} The internal padding for the content div. |
| Constructor | |
| EMS. | Constructs a new instance of a popup. |
| Functions | |
| visible | Determine whether or not the popup is visible. |
| toggle | Toggle visibility of the popup. |
| show | Make the popup visible. |
| hide | Make the popup invisible. |
| setSize | Sets the size of the popup. |
| setBackgroundColor | Sets the background colour of the popup. |
| setOpacity | Sets the opacity |
| setBorder | Sets the border style for the popup. |
| setContentHTML | Sets the contents of the popup |
{OpenLayers.Events} events object to be used when attaching custom events handlers to this object.
{EMS.LonLat} Prefix to lonlat field
Constructs a new instance of a popup.
| 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} or {EMS.Icon}). |
| closeBox | {Boolean} whether to display close button. |
setBackgroundColor:function( color )
Sets the background colour of the popup.
| color | {Mixed} is either a {String} as a hex color or an EMS.Color. |
Determine whether or not the popup is visible.
visible: function()
Toggle visibility of the popup.
toggle: function()
Make the popup visible.
show: function()
Make the popup invisible.
hide: function()
Sets the size of the popup.
setSize:function( size )
Sets the background colour of the popup.
setBackgroundColor:function( color )
Sets the opacity
setOpacity:function( opacity )
Sets the border style for the popup.
setBorder:function( border )
Sets the contents of the popup
setContentHTML:function( contentHTML )
addPopup: function( popup, exclusive )