new FeaturePopup(options)
Create an instance of FeaturePopup
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 layer
ol.layer.Vector The layer to add
- Source:
-
addLayers(layers)
-
Add layers
Parameters:
Name Type Description layers
Array.<ol.layer.Vector> The layers to add
- Source:
-
cssClass(css)
-
Set a CSS class for the popup content
Parameters:
Name Type Description css
string 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 event
ol.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 options
module: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 feature
ol.Feature The feature
coordinate
ol.Coordinate <optional>
The coordinate
- Source:
Type Definitions
-
Options
-
Constructor option for module:nyc/ol/FeaturePopup~FeaturePopup
Type:
- Object
- Source:
Properties:
Name Type Description map
ol.Map The map
layers
Array.<ol.layer.Vector> The layers for which the popup will report feature properties