new FeatureTip(options)
Create an instance of FeatureTip
Parameters:
Name | Type | Description |
---|---|---|
options |
module:nyc/ol/FeatureTip~FeatureTip.Options | Constructor options |
Extends
- ol.Overlay
Methods
-
addTips(tips)
-
Adds tip definitions
Parameters:
Name Type Description tips
Array.<module:nyc/ol/FeatureTip~FeatureTip.TipDef> The tip definitions to add
- Source:
-
hide()
-
Hide the feature tip
- Source:
Type Definitions
-
Label
-
Object type to return from a feature's label function
Type:
- Object
- Source:
Properties:
Name Type Argument Description html
jQuery | Element | string The tip content
css
string <optional>
A CSS class to apply to the tip
-
LabelFunction()
-
Label function that returns a module:nyc/ol/FeatureTip~FeatureTip.Label
- Source:
-
Options
-
Constructor options for module:nyc/ol/FeatureTip~FeatureTip
Type:
- Object
- Source:
Properties:
Name Type Description map
ol.Map The map
tips
Array.<module:nyc/ol/FeatureTip~FeatureTip.TipDef> The tip definitions
-
TipDef
-
Object with configuration options for feature tips
Type:
- Object
- Source:
Properties:
Name Type Description layer
ol.layer.Vector The layer whose features will have tips
label
module:nyc/ol/FeatureTip~FeatureTip.LabelFunction A function to generate tips