FeaturePopup
Expression Extends:
class FeaturePopup extends mixin(BaseObject, ListenerOrganizerMixin)
Displays a Popup bound to a geographical position via an ol.Overlay
Static Method Summary
Static Public Methods | ||
public static |
canDisplay(feature: ol.Feature): boolean |
Constructor Summary
Public Constructor | ||
public |
constructor(options: FeaturePopupOptions) |
Member Summary
Public Members | ||
public |
|
Private Members | ||
private |
$description_: jQuery |
|
private |
$element_: jQuery |
|
private |
$name_: jQuery |
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
overlay_: ol.Overlay |
|
private |
|
|
private |
referencingVisibleLayers_: VectorLayer[] |
|
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
addIconSizedOffset(feature: ol.Feature, style: ol.style.Style, resolution: number) calculates iconSized Offset and applies it |
|
public |
addReferencingLayer_(layer: *) |
|
public |
centerMapOnPopup(animated: *) Centers the map on the popup after all images have been loaded |
|
public |
getCenter(): ol.Coordinate calculates Center of the Popup. |
|
public |
getFeature(): null | ol.Feature |
|
public |
|
|
public |
|
|
public |
|
|
public |
layerContainsFeature(layer: *, feature: *): boolean |
|
public |
setFeature(feature: ol.Feature, layer: ol.layer.Base, style: ol.style.Style, clickCoordinate: ol.Coordinate, optPopupModifiers: string[]) The feature should have a property 'name' and/or 'description' to be shown inside of the popup. |
|
public |
|
|
public |
setVisible(visible: boolean) |
|
public |
update(style: *) Update the Popup. |
|
public |
updateContent(): * |
|
public |
|
Private Methods | ||
private |
onFeatureClick_(feature: ol.Feature, layer: ol.layer.Vector, coordinate: ol.Coordinate) |
|
private |
removeReferencingLayer_(layer: VectorLayer) |
Static Public Methods
Public Constructors
public constructor(options: FeaturePopupOptions) source
Params:
Name | Type | Attribute | Description |
options | FeaturePopupOptions |
Public Members
public geometryChangeHandler_: * source
Private Members
private $description_: jQuery source
private $element_: jQuery source
private $name_: jQuery source
private overlay_: ol.Overlay source
private referencingVisibleLayers_: VectorLayer[] source
Public Methods
public addIconSizedOffset(feature: ol.Feature, style: ol.style.Style, resolution: number) source
calculates iconSized Offset and applies it
Params:
Name | Type | Attribute | Description |
feature | ol.Feature | ||
style | ol.style.Style | ||
resolution | number |
public addReferencingLayer_(layer: *) source
Params:
Name | Type | Attribute | Description |
layer | * |
public centerMapOnPopup(animated: *) source
Centers the map on the popup after all images have been loaded
Params:
Name | Type | Attribute | Description |
animated | * |
public getCenter(): ol.Coordinate source
calculates Center of the Popup. Be careful, this calculation repositions the popup to calculate the center properly and repostions to the initial Position again. This does only work if the popup is already visible!
Return:
ol.Coordinate |
public layerContainsFeature(layer: *, feature: *): boolean source
Params:
Name | Type | Attribute | Description |
layer | * | ||
feature | * |
public setFeature(feature: ol.Feature, layer: ol.layer.Base, style: ol.style.Style, clickCoordinate: ol.Coordinate, optPopupModifiers: string[]) source
The feature should have a property 'name' and/or 'description' to be shown inside of the popup.
Params:
Name | Type | Attribute | Description |
feature | ol.Feature | ||
layer | ol.layer.Base | ||
style | ol.style.Style | ||
clickCoordinate | ol.Coordinate | ||
optPopupModifiers | string[] |
|
public update(style: *) source
Update the Popup. Call this if something in the feature has changed
Params:
Name | Type | Attribute | Description |
style | * |
public updateSize() source
Private Methods
private onFeatureClick_(feature: ol.Feature, layer: ol.layer.Vector, coordinate: ol.Coordinate) source
Params:
Name | Type | Attribute | Description |
feature | ol.Feature | ||
layer | ol.layer.Vector | ||
coordinate | ol.Coordinate |
private removeReferencingLayer_(layer: VectorLayer) source
Params:
Name | Type | Attribute | Description |
layer | VectorLayer |