Class: Compass

ol.control. Compass


new Compass( [options])

Draw a compass on the map. The position/size of the control is defined in the css.

Parameters:
Name Type Argument Description
options Object <optional>

Control options. The style {_ol_style_Stroke_} option is usesd to draw the text.

Properties
Name Type Description
className string

class name for the control

image Image

an image, default use the src option or a default image

src string

image src, default use the image option or a default image

rotateVithView boolean

rotate vith view (false to show watermark), default true

style _ol_style_Stroke_

style to draw the lines, default draw no lines

Extends

Methods


setMap(map)

Remove the control from its current map and attach it to the new map.

Parameters:
Name Type Description
map _ol_Map_

Map.