new Popup(options)
Create an instance of Popup
Parameters:
Name | Type | Description |
---|---|---|
options |
module:nyc/ol/Popup~Popup.Options | Constructor options |
Extends
- ol.Overlay
Methods
-
cssClass(css)
-
Set a CSS class for the popup content
Parameters:
Name Type Description css
string A css class
- Source:
-
goFullscreen()
-
Make the popup fill the map
- Source:
-
hide()
-
Hide the popup
- Source:
-
pan()
-
Pan the popup so it full appears on the map
- Source:
-
show(options)
-
Show the popup
Parameters:
Name Type Description options
module:nyc/ol/Popup~Popup.ShowOptions Overlay options
- Source:
Type Definitions
-
Options
-
Constructor option for module:nyc/ol/Popup~Popup
Type:
- Object
- Source:
Properties:
Name Type Argument Default Description map
ol.Map The map
autoPanMargin
number <optional>
10 The margin the popup will maintain from the edge of the map
-
ShowOptions
-
Options for module:nyc/ol/Popup~Popup#show
Type:
- Object
- Source:
Properties:
Name Type Argument Description html
jQuery | Element | string The popup content
coordinate
ol.coordinate The popup location
css
string <optional>
A css class