Packageorg.openzoom.flash.viewport.constraints
Classpublic final class MapConstraint
ImplementsIViewportConstraint

Viewport constraint that ensures that the viewport only reaches zoom values that are powers of two. Very useful for mapping application where map tiles contain text labels and best look at scales that are power of two.



Public Methods
 MethodDefined by
  
Constructor.
MapConstraint
  
Validate the viewport transform by performing transformations until it validates all constraints.
MapConstraint
Constructor detail
MapConstraint()constructor
public function MapConstraint()

Constructor.

Method detail
validate()method
public function validate(transform:IViewportTransform, target:IViewportTransform):IViewportTransform

Validate the viewport transform by performing transformations until it validates all constraints.

Parameters
transform:IViewportTransform — IViewportTransform object to be validated.
 
target:IViewportTransform — IViewportTransform object that represents the last validated transform.

Returns
IViewportTransform — Validated IViewportTransform object.