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


getCanvas()

Get canvas overlay

Inherited From:

getFill()

Get fill

Inherited From:

getStroke()

Get stroke

Inherited From:

getStyle()

Get style

Inherited From:

getTextFill()

Get text fill

Inherited From:

getTextFont()

Get text font

Inherited From:

getTextStroke()

Get stroke

Inherited From:

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 o.Map

Map.

Inherited From:

setStyle()

Set Style

Inherited From: