new FeaturePopup(options)
A class to display popups on a map that display feature data
Parameters:
| Name | Type | Description |
|---|---|---|
options |
module:nyc/ol/FeaturePopup~FeaturePopup.Options | Constructor options |
- Source:
Extends
Methods
-
addLayer(layer)
-
Add a layer
Parameters:
Name Type Description layerol.layer.Vector The layer to add
- Source:
-
addLayers(layers)
-
Add layers
Parameters:
Name Type Description layersArray.<ol.layer.Vector> The layers to add
- Source:
-
cssClass(css)
-
Set a CSS class for the popup content
Parameters:
Name Type Description cssstring A css class
- Inherited From:
- Overrides:
- Source:
-
goFullscreen()
-
Make the popup fill the map
- Inherited From:
- Overrides:
- Source:
-
hide()
-
Hide the popup
- Inherited From:
- Overrides:
- Source:
-
<protected> mapClick(event)
-
Handles map click events
Parameters:
Name Type Description eventol.MapBrowserEvent OpenLayers map browser event
- Source:
-
pan()
-
Pan the popup so it full appears on the map
- Inherited From:
- Overrides:
- Source:
-
show(options)
-
Show the popup
Parameters:
Name Type Description optionsmodule:nyc/ol/Popup~Popup.ShowOptions Overlay options
- Inherited From:
- Overrides:
- Source:
-
showFeature(feature [, coordinate])
-
Show the HTML rendered feature in the popup
Parameters:
Name Type Argument Description featureol.Feature The feature
coordinateol.Coordinate <optional>
The coordinate
- Source:
Type Definitions
-
Options
-
Constructor option for module:nyc/ol/FeaturePopup~FeaturePopup
Type:
- Object
- Source:
Properties:
Name Type Description mapol.Map The map
layersArray.<ol.layer.Vector> The layers for which the popup will report feature properties