Table of Contents

Struct MapInteractionController.DoubleTapZoomChain

Namespace
LansMap.Interaction

Stacks rapid double-tap zooms onto the previous fly target so N taps always add N zoom levels.

public struct MapInteractionController.DoubleTapZoomChain
Inherited Members

Remarks

Each tap adds a fixed zoom increment to the previous tap's target, even if that animation has not finished. An unrelated gesture must call Invalidate() or the next tap stacks onto a stale target.

Methods

Invalidate()

Drops the chain so the next double-tap bases on the live zoom instead of a stale target.

public void Invalidate()

NextBase(bool, double)

Zoom to increment from: the chained target while that fly is running, otherwise the live zoom.

public double NextBase(bool isFlying, double liveZoom)

Parameters

isFlying bool

True while a FlyTo animation is in progress.

liveZoom double

Current map zoom in Web Mercator zoom units.

Returns

double

Base zoom in Web Mercator zoom units.

Observe(bool)

Call once per frame; retires the chain the first time the fly settles so an unrelated FlyTo cannot revive it.

public void Observe(bool isFlying)

Parameters

isFlying bool

True while any FlyTo animation is in progress on the map.

Remarks

IsFlying is global, not scoped to this chain. Skip this call and a later unrelated fly can resurrect a finished chain's target.

Record(double)

Remembers the zoom a just-launched double-tap fly is heading to.

public void Record(double newTarget)

Parameters

newTarget double

Target zoom in Web Mercator zoom units.