Methods
_attachEventHandlers()
Attach event handlers for hover and click
- Source:
_clearHighlight()
Clear feature highlight
- Source:
_createHighlightLayer()
Create OpenLayers layer for feature highlighting
- Source:
_createPopupHtml(features) → {string}
Create HTML for popup table
Parameters:
| Name | Type | Description |
|---|---|---|
features |
Array | Array of features |
- Source:
Returns:
HTML string
- Type
- string
_escapeHtml(text) → {string}
Escape HTML to prevent XSS
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string | Text to escape |
- Source:
Returns:
Escaped HTML
- Type
- string
_highlightFeature(index)
Highlight a feature on the map
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number | Index of feature to highlight |
- Source:
_selectFeature(index)
Select a feature and trigger callback
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number | Index of feature to select |
- Source:
hide()
Hide and cleanup popup
- Source:
show(features, coordinate, onSelect)
Show popup with feature list
Parameters:
| Name | Type | Description |
|---|---|---|
features |
Array | Array of features with metadata |
coordinate |
object | Click coordinates {x, y} |
onSelect |
function | Callback when feature is selected |
- Source: