A mixin object containing map styles for the OpenLayers map.
- Source:
Methods
(function) data()
- Source:
(method) extendLine(a, b, distance) → {Array.<number>}
Extends a line segment from point a to point b by a specified distance.
Parameters:
Name | Type | Description |
---|---|---|
a |
Array.<number> | The coordinates of point a. |
b |
Array.<number> | The coordinates of point b. |
distance |
number | The distance by which to extend the line segment. |
- Source:
Returns:
The coordinates of the extended point c.
- Type
- Array.<number>
(method) getBoundaryStyle(feature) → {Style}
Returns the style for a boundary feature.
Parameters:
Name | Type | Description |
---|---|---|
feature |
Feature | The boundary feature. |
- Source:
Returns:
The style for the boundary feature.
- Type
- Style
(method) getObservationPointStyle(feature, zoom) → {Style}
Returns the style for a given observation point based on zoom.
Parameters:
Name | Type | Description |
---|---|---|
feature |
Feature | The feature for which to get the style. |
zoom |
number | The current zoom level of the map. |
- Source:
Returns:
The style for the feature.
- Type
- Style
(method) getPointStyle(feature, clustered, zoom) → {Style}
Returns the style for a given point based on whether it is clustered or not.
Parameters:
Name | Type | Description |
---|---|---|
feature |
Feature | The feature for which to get the style. |
clustered |
boolean | Indicates whether the feature is clustered or not. |
zoom |
number | The current zoom level of the map. |
- Source:
Returns:
The style for the feature.
- Type
- Style
(method) getTextDimensions(text)
Get the dimensions of a given text string.
Parameters:
Name | Type | Description |
---|---|---|
text |
* |
- Source:
Returns:
[width, height]
(method) selectedStyleFunction(feature) → {Array.<Style>}
Generates an array of styles for a given feature.
Parameters:
Name | Type | Description |
---|---|---|
feature |
Feature | The feature to generate styles for. |
- Source:
Returns:
- An array of styles for the feature.
- Type
- Array.<Style>
(method) unitVector(a, b) → {Array.<number>}
Calculates the unit vector from point a to point b.
Parameters:
Name | Type | Description |
---|---|---|
a |
Array.<number> | The coordinates of point a. |
b |
Array.<number> | The coordinates of point b. |
- Source:
Returns:
The unit vector from point a to point b.
- Type
- Array.<number>