new Graticule( [_ol_control_])
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
_ol_control_ |
Object |
<optional> |
options. |
options.projection |
ol.projectionLike | projection to use for the graticule, default EPSG:4326 |
|
options.maxResolution |
number | max resolution to display the graticule |
|
options.style |
ol.style.Style | Style to use for drawing the graticule, default black / white. Line style is used for drawing lines (no line if not defined). Fill style is used to draw the border. Text style is used to draw coords. |
|
options.step |
number | step between lines (in proj units), default 1 |
|
options.stepCoord |
number | show a coord every stepCoord, default 1 |
|
options.spacing |
number | spacing between lines (in px), default 40px |
|
options.intervals |
Array.<number> | array (in desending order) of intervals (in proj units) constraining which lines will be displayed, default is no contraint (any multiple of step can be used) |
|
options.precision |
number | precision interval (in proj units) of displayed lines, if the line interval exceeds this more calculations will be used to display curved lines more accurately |
|
options.borderWidth |
number | width of the border (in px), default 5px |
|
options.margin |
number | margin of the border (in px), default 0px |
|
options.formatCoord |
number | a function that takes a coordinate and a position and return the formated coordinate |
Extends
Methods
-
<protected> _draw()
-
Draw the control on canvas
- Inherited From:
- Overrides:
-
getCanvas()
-
Get canvas overlay
- Inherited From:
- Overrides:
-
getFill()
-
Get fill
- Inherited From:
- Overrides:
-
getStroke()
-
Get stroke
- Inherited From:
- Overrides:
-
getStyle()
-
Get style
- Inherited From:
- Overrides:
-
getTextFill()
-
Get text fill
- Inherited From:
- Overrides:
-
getTextFont()
-
Get text font
- Inherited From:
- Overrides:
-
getTextStroke()
-
Get stroke
- Inherited From:
- Overrides:
-
setMap(map)
-
Remove the control from its current map and attach it to the new map. Subclasses may set up event handlers to get notified about changes to the map here.
Parameters:
Name Type Description map
ol.Map Map.
- Inherited From:
- Overrides:
-
setStyle()
-
Set Style
- Inherited From:
- Overrides: