Classes
Type Definitions
Options
Type:
- object
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
className |
string |
<optional> |
'ol-layer' | A CSS class name to set to the layer element. |
opacity |
number |
<optional> |
1 | Opacity (0, 1). |
visible |
boolean |
<optional> |
true | Visibility. |
extent |
Extent |
<optional> |
The bounding extent for layer rendering. The layer will not be rendered outside of this extent. |
|
zIndex |
number |
<optional> |
The z-index for layer rendering. At rendering time, the layers
will be ordered, first by Z-index and then by position. When |
|
minResolution |
number |
<optional> |
The minimum resolution (inclusive) at which this layer will be visible. |
|
maxResolution |
number |
<optional> |
The maximum resolution (exclusive) below which this layer will be visible. |
|
minZoom |
number |
<optional> |
The minimum view zoom level (exclusive) above which this layer will be visible. |
|
maxZoom |
number |
<optional> |
The maximum view zoom level (inclusive) at which this layer will be visible. |
|
maxLines |
number |
<optional> |
100 | The maximum number of meridians and parallels from the center of the map. The default value of 100 means that at most 200 meridians and 200 parallels will be displayed. The default value is appropriate for conformal projections like Spherical Mercator. If you increase the value, more lines will be drawn and the drawing performance will decrease. |
strokeStyle |
Stroke |
<optional> |
The stroke style to use for drawing the graticule. If not provided, the following stroke will be used:
|
|
targetSize |
number |
<optional> |
100 | The target size of the graticule cells, in pixels. |
showLabels |
boolean |
<optional> |
false | Render a label with the respective latitude/longitude for each graticule line. |
lonLabelFormatter |
function |
<optional> |
Label formatter for longitudes. This function is called with the longitude as argument, and should return a formatted string representing the longitude. By default, labels are formatted as degrees, minutes, seconds and hemisphere. |
|
latLabelFormatter |
function |
<optional> |
Label formatter for latitudes. This function is called with the latitude as argument, and should return a formatted string representing the latitude. By default, labels are formatted as degrees, minutes, seconds and hemisphere. |
|
lonLabelPosition |
number |
<optional> |
0 | Longitude label position in fractions (0..1) of view extent. 0 means at the bottom of the viewport, 1 means at the top. |
latLabelPosition |
number |
<optional> |
1 | Latitude label position in fractions (0..1) of view extent. 0 means at the left of the viewport, 1 means at the right. |
lonLabelStyle |
Text |
<optional> |
Longitude label text style. If not provided, the following style will be used:
Note that the default's |
|
latLabelStyle |
Text |
<optional> |
Latitude label text style. If not provided, the following style will be used:
Note that the default's |
|
intervals |
Array.<number> |
<optional> |
[90, 45, 30, 20, 10, 5, 2, 1, 30/60, 20/60, 10/60, 5/60, 2/60, 1/60, 30/3600, 20/3600, 10/3600, 5/3600, 2/3600, 1/3600] | Intervals (in degrees) for the graticule. Example to limit graticules to 30 and 10 degrees intervals:
|
wrapX |
boolean |
<optional> |
true | Whether to repeat the graticule horizontally. |
properties |
object |
<optional> |
Arbitrary observable properties. Can be accessed with |
- Source: