Class: Globe

ol.control. Globe

OpenLayers 3 lobe Overview Control. The globe can rotate with map (follow.)


new Globe( [options], follow, align, layers, style)

Parameters:
Name Type Argument Description
options Object <optional>

Control options.

follow boolean

follow the map when center change, default false

align top | bottom-left | right

position as top-left, etc.

layers Array.<ol.layer>

list of layers to display on the globe

style ol.style.Style | Array.<ol.style.Style> | undefined

style to draw the position on the map , default a marker

Extends

Methods


getGlobe()

Get globe map

Returns:
Type
ol.Map

setCenter(center, show)

Set the globe center

Parameters:
Name Type Description
center _ol_coordinate_

the point to center to

show boolean

show a pointer on the map, defaylt true


setMap(map)

Set the map instance the control associated with.

Parameters:
Name Type Description
map ol.Map

The map instance.


setPosition(align)

Set position on the map

Parameters:
Name Type Description
align top | bottom-left | right

setView()

Set the globe center with the map center


show()

Show/hide the globe