Home Reference Source
import {Move} from 'guide4you/src/Move.js'
public class | source

Move

Moves the map. Uses animations if desired.

Constructor Summary

Public Constructor
public

Member Summary

Private Members
private
private
private
private
private
private

Method Summary

Public Methods
public
public

setAnimations(animations: boolean)

Turns animations on or off

public

toExtent(extent: ol.Extent, options: SingleMoveOptions)

public

toPoint(point: Coordinate, options: SingleMoveOptions)

public

zoomToPoint(point: ol.Point, options: SingleMoveOptions)

Private Methods
private

animationZoomToExtent_(endExtent: ol.Extent, options: SingleMoveOptions)

This function glides or bounces to an extent

private

bufferUpToMinSize_(extent: ol.Extent, minSize: number): ol.Extent

private

Easing function based on a parabolic function

private

Easing function based on a circle function

private

fit_(extent: ol.Extent, options: SingleMoveOptions)

private

Easing function based on a parabolic function

private

Easing function based on a circle function

Public Constructors

public constructor(options: MoveOptions) source

Params:

NameTypeAttributeDescription
options MoveOptions

Private Members

private animationDuration_: number source

private animations_: boolean source

private bouncing_: boolean source

private map_: G4UMap source

private meterMinSize_: number source

private pixelPadding_: number source

Public Methods

public getAnimations(): boolean source

Return:

boolean

public setAnimations(animations: boolean) source

Turns animations on or off

Params:

NameTypeAttributeDescription
animations boolean

public toExtent(extent: ol.Extent, options: SingleMoveOptions) source

Params:

NameTypeAttributeDescription
extent ol.Extent
options SingleMoveOptions
  • optional
  • default: {}

public toPoint(point: Coordinate, options: SingleMoveOptions) source

Params:

NameTypeAttributeDescription
point Coordinate
options SingleMoveOptions
  • optional
  • default: {}

public zoomToPoint(point: ol.Point, options: SingleMoveOptions) source

Params:

NameTypeAttributeDescription
point ol.Point
options SingleMoveOptions
  • optional
  • default: {}

Private Methods

private animationZoomToExtent_(endExtent: ol.Extent, options: SingleMoveOptions) source

This function glides or bounces to an extent

Params:

NameTypeAttributeDescription
endExtent ol.Extent
options SingleMoveOptions

private bufferUpToMinSize_(extent: ol.Extent, minSize: number): ol.Extent source

Params:

NameTypeAttributeDescription
extent ol.Extent
minSize number

Return:

ol.Extent

private earlyFastRiseEasing2_(t: number): number source

Easing function based on a parabolic function

Params:

NameTypeAttributeDescription
t number

Return:

number

private earlyFastRiseEasing_(t: number): number source

Easing function based on a circle function

Params:

NameTypeAttributeDescription
t number

Return:

number

private fit_(extent: ol.Extent, options: SingleMoveOptions) source

Params:

NameTypeAttributeDescription
extent ol.Extent
options SingleMoveOptions

private lateFastRiseEasing2_(t: number): number source

Easing function based on a parabolic function

Params:

NameTypeAttributeDescription
t number

Return:

number

private lateFastRiseEasing_(t: number): number source

Easing function based on a circle function

Params:

NameTypeAttributeDescription
t number

Return:

number