new FeatureTip(map, tipDefsopt)
A class for providing tool tips on mouseover for vector features
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
map |
ol.Map | The OpenLayers map with which the user will interact | |
tipDefs |
Array.<nyc.ol.FeatureTip.TipDef> |
<optional> |
The tip definitions |
- Source:
Methods
addtipDefs(tipDefs)
Adds tip definitions
Parameters:
Name | Type | Description |
---|---|---|
tipDefs |
Array.<nyc.ol.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
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
text |
string | The tip text | |
cssClass |
string |
<optional> |
A CSS class to apply to the tip |
- Source:
LabelFunction()
Label function that runs in the scope of the feature and returns a nyc.ol.FeatureTip.Label
- Source:
TipDef
Object with configuration options for feature tips
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
source |
ol.source.Vector | The source of the features |
labelFunction |
nyc.ol.FeatureTip.LabelFunction | A function to generate tips |
- Source: