new MouseHoverPopupModel()
modules/mouseHover/model.js, line 33
Properties:
| Name | Type | Default | Description |
|---|---|---|---|
channel |
Radio.channel | Radio.channel("MouseHover") | Radio channel for communication |
overlay |
ol.Feature | newOverlay({id:"mousehover-overlay"}) | New OpenLayers Overlay instance |
textPosition |
String | null | Position for the popup to open |
textArray |
Array | null | Array to hold the text for the popup |
minShift |
Number | 5 | Minimum shift to check if the mouse position changed significantly |
numFeaturesToShow |
Number | 2 | Maximum number of texts to show |
Fires:
- MouseHover#event:render
- Map#event:RadioTriggerMapAddOverlay
- Map#event:RadioTriggerMapRegisterListener
- Parser#event:RadioRequestParserGetItemsByAttributes
Listens to Events:
Extends
Methods
-
addBreak(textArray){Array}
modules/mouseHover/model.js, line 398 -
add html br between every element in values
Name Type Description textArrayArray Array without html br Returns:
Array with html br
-
checkAction(featuresArray, evt){void}
modules/mouseHover/model.js, line 241 -
Checks which MouseHover action needs to happen depending on the features to show
Name Type Description featuresArrayArray Array of the features to show evtevt Event-Object -
checkDragging(evt){void}
modules/mouseHover/model.js, line 210 -
Checks Drag-Modus
Name Type Description evtevt Event-Object -
checkForFeaturesAtPixel(evt){void}
modules/mouseHover/model.js, line 222 -
Checks the features at the mouse position
Name Type Description evtevt PointerMoveEvent -
checkMaxFeaturesToShow(textArray){Array}
modules/mouseHover/model.js, line 373 -
Adapt the number of texts to show to "numFeaturesToShow" through _.sample
Name Type Description textArrayArray Array containing all texts Returns:
Array containing correct number of texts
-
checkTextArray(featureArray){Array}
modules/mouseHover/model.js, line 344 -
This function examines the pFeatureArray and extracts the text to show
Name Type Description featureArrayArray Array of features at MousePosition Returns:
Array containing text to show
-
checkTextPosition(evt){void}
modules/mouseHover/model.js, line 287 -
Checks if the mouse position significantly changed from Config value
Name Type Description evtevt MouseHover -
destroyPopup(){void}
modules/mouseHover/model.js, line 114 -
Destroy the Popup.
-
fillFeatureArray(featureAtPixel){Array}
modules/mouseHover/model.js, line 174 -
Create feature array
Name Type Description featureAtPixelol.Feature feature at pixel Returns:
Array of features at pixel
-
getFeaturesAtPixel(evt, mouseHoverInfos){Array}
modules/mouseHover/model.js, line 143 -
Gets the features at the pixel
Name Type Description evtevt PointerMoveEvent mouseHoverInfosArray Array of mouseHoverInfos Returns:
Array of features at the pixel
-
getMouseHoverInfosFromConfig(){void}
modules/mouseHover/model.js, line 72 -
Gets MouseHoverInfos from config.
Fires:
- Parser#event:RadioRequestParserGetItemsByAttributes
-
isClusterFeature(feature){Boolean}
modules/mouseHover/model.js, line 163 -
Checks if the feature is a cluster feature
Name Type Description featureol.Feature feature at pixel Returns:
True or False result of feature check
-
isTextEqual(array1, array2){Boolean}
modules/mouseHover/model.js, line 272 -
Checks if both arrays are identical
Name Type Description array1Array new text array2Array old text Returns:
True or False result of the check
-
pickValue(mouseHoverField, featureProperties){String}
modules/mouseHover/model.js, line 305 -
Return the string for the popup if showLayerName is set in config.js, the layername will be append
Name Type Description mouseHoverFieldString | Array Content for popup featurePropertiesObject Properties of features Returns:
String of popup content
-
setMinShift(value){void}
modules/mouseHover/model.js, line 425 -
setter for minShift
Name Type Description valueNumber minShift value -
setMouseHoverInfos(value){void}
modules/mouseHover/model.js, line 452 -
setter for mouseHoverInfos
Name Type Description valueString | Array mouseHoverInfos value -
setOverlayPosition(value){void}
modules/mouseHover/model.js, line 133 -
Sets the position of the overlay
Name Type Description valueol.Coordinate | undefined if the value is undefined the overlay is hidden -
setPoinertMoveListener(value){void}
modules/mouseHover/model.js, line 416 -
setter for pointerMoveListener
Name Type Description valueobject event object -
setTextArray(value){void}
modules/mouseHover/model.js, line 443 -
setter for textArray
Name Type Description valueString textArray value -
setTextPosition(value){void}
modules/mouseHover/model.js, line 434 -
setter for textPosition
Name Type Description valueString textPosition value -
showPopup(){void}
modules/mouseHover/model.js, line 124 -
Shows the Popup.
Fires:
-
toggle(id){void}
modules/mouseHover/model.js, line 56 -
turns the overlay on or off
Name Type Description idstring | number the overlay identifier