Class: Overview

ol.control. Overview


new Overview( [options])

OpenLayers 3 Layer Overview Control. The overview can rotate with map. Zoom levels are configurable. Click on the overview will center the map. Change width/height of the overview trough css.

Parameters:
Name Type Argument Description
options Object <optional>

Control options.

Properties
Name Type Description
projection ol.ProjectionLike

The projection. Default is EPSG:3857 (Spherical Mercator).

minZoom Number

default 0

maxZoom Number

default 18

rotation boolean

enable rotation, default false

align top | bottom-left | right

position

layers Array.<ol.layer>

list of layers

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

style to draw the map extent on the overveiw

panAnimation bool | elastic

use animation to center map on click, default true

Extends

Methods


calcExtent_()

Calculate the extent of the map and draw it on the overview


getOverviewMap()

Get overview map

Returns:
Type
ol.Map

setMap(map)

Set the map instance the control associated with.

Parameters:
Name Type Description
map ol.Map

The map instance.


setPosition(align)

Set overview map position

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

toggleMap()

Toggle overview map


<inner> elasticFn(bounce, amplitude, bounce, amplitude)

Elastic bounce

Parameters:
Name Type Description
bounce Int

number of bounce

amplitude Number

amplitude of the bounce [0,1]

bounce Int

number of bounce

amplitude Number

amplitude of the bounce [0,1]

Returns:
  • / var bounceFn = function (bounce, amplitude){ var a = (2bounce+1) * Math.PI/2; var b = amplitude>0 ? -1/amplitude : -100; var c = - Math.cos(a) * Math.pow(2, b); return function(t) { t = 1-Math.cos(tMath.PI/2); return 1 + Math.abs( Math.cos(at) ) * Math.pow(2, bt) + c*t; } } /** Elastic bounce

    Type
    Number
  • Type
    Number