Popup class
An information window anchored at a specified position on a map.
- Extends
Constructors
| Popup(Popup |
Constructs a Popup object and initializes it with the specified options. |
Properties
| attach | Attaches the popup to the HTML document in a hidden state. |
| close | Closes the popup on the map. The popup remains attached to the HTML document. |
| is |
Returns true if the popup is currently open, otherwise false. |
| open | Opens the popup. |
| remove | Closes the popup on the map and removes it from the HTML document. |
Methods
| get |
Returns the options for the popup. |
| get |
Returns the options for the popup. |
| set |
Sets the options for the popup. |
| set |
Sets the options for the popup. |
Constructor Details
Popup(PopupOptions)
Constructs a Popup object and initializes it with the specified options.
new Popup(options?: PopupOptions)
Parameters
- options
- PopupOptions
The options for the popup.
Property Details
attach
Attaches the popup to the HTML document in a hidden state.
attach: (map: Map) => void
Property Value
(map: Map) => void
close
Closes the popup on the map. The popup remains attached to the HTML document.
close: () => void
Property Value
() => void
isOpen
Returns true if the popup is currently open, otherwise false.
isOpen: () => boolean
Property Value
() => boolean
open
Opens the popup.
open: (map?: Map) => void
Property Value
(map?: Map) => void
remove
Closes the popup on the map and removes it from the HTML document.
remove: () => void
Property Value
() => void
Method Details
getOptions()
getPopupOptions()
Warning
This API is now deprecated.
Use getOptions() instead.
Returns the options for the popup.
function getPopupOptions()
Returns
setOptions(PopupOptions)
Sets the options for the popup.
function setOptions(options?: PopupOptions)
Parameters
- options
- PopupOptions
The options for the popup.
setPopupOptions(PopupOptions)
Warning
This API is now deprecated.
Use setOptions(...) instead.
Sets the options for the popup.
function setPopupOptions(options?: PopupOptions)
Parameters
- options
- PopupOptions
The options for the popup.