new FixedPopup(options)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Extend Overlay options Properties
|
Fires:
- event:show
- event:hide
Extends
Methods
-
addPopupClass(c)
-
Add a CSS class to the popup.
Parameters:
Name Type Description c
string class name.
- Inherited From:
- Overrides:
-
getLinkStyle()
-
Get link style
Returns:
style
- Type
- ol.style.Style
-
getPixelPosition()
-
Set pixel position
Returns:
- Type
- ol.pixel
-
getVisible()
-
Check if popup is visible
- Inherited From:
- Overrides:
Returns:
- Type
- boolean
-
hide()
-
Hide the popup
- Inherited From:
- Overrides:
-
removePopupClass(c)
-
Remove a CSS class to the popup.
Parameters:
Name Type Description c
string class name.
- Inherited From:
- Overrides:
-
setClosebox(b)
-
Set a close box to the popup.
Parameters:
Name Type Description b
bool - Inherited From:
- Overrides:
-
setLinkStyle(style)
-
Set link style
Parameters:
Name Type Description style
ol.style.Style -
setMap(map)
-
Set the map instance the control is associated with and add its controls associated to this map.
Parameters:
Name Type Description map
_ol_Map_ The map instance.
-
setPixelPosition(pix, position)
-
Set pixel position
Parameters:
Name Type Description pix
ol.pixel position
string top/bottom/middle-left/right/center
-
setPopupClass(c)
-
Set the CSS class of the popup.
Parameters:
Name Type Description c
string class name.
- Overrides:
-
setPositioning(pos)
-
Set positionning of the popup
Parameters:
Name Type Description pos
ol.OverlayPositioning | string | undefined an ol.OverlayPositioning or 'auto' to var the popup choose the best position
- Inherited From:
- Overrides:
-
setRotation(angle, update)
-
Set poppup rotation
Parameters:
Name Type Description angle
number update
booelan update popup, default true
-
setScale(scale, update)
-
Set poppup scale
Parameters:
Name Type Description scale
number update
booelan update popup, default true
-
show(coordinate, html)
-
Set the position and the content of the popup.
Parameters:
Name Type Description coordinate
ol.Coordinate | string the coordinate of the popup or the HTML content.
html
string | undefined the HTML content (undefined = previous content).
- Inherited From:
- Overrides:
Example
var popup = new ol.Overlay.Popup(); // Show popup popup.show([166000, 5992000], "Hello world!"); // Move popup at coord with the same info popup.show([167000, 5990000]); // set new info popup.show("New informations");