Class: CenterPosition

ol.control. CenterPosition


new CenterPosition( [options])

A title Control integrated in the canvas (for jpeg/png

Parameters:
Name Type Argument Description
options Object <optional>

extend the ol.control options.

Properties
Name Type Description
className string

CSS class name

style ol.style.Style

style used to draw in the canvas

projection ol.proj.ProjectionLike

Projection. Default is the view projection.

coordinateFormat ol.coordinate.CoordinateFormat

A function that takes a ol.Coordinate and transforms it into a string.

canvas boolean

true to draw in the canvas

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:

getVisible()

Get control visibility

Returns:
Type
bool

setCanvas(b)

Draw on canvas

Parameters:
Name Type Description
b boolean

draw the attribution on canvas.


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(style)

Change the control style

Parameters:
Name Type Description
style ol.style.Style
Overrides:

setVisible(b)

Set control visibility

Parameters:
Name Type Description
b bool