Packagecom.afcomponents.umap.interfaces
Interfacepublic interface IProjection
ImplementorsGCSProjection, LinearProjection, MercatorProjection

IProjection interface describes a projection class.

Such clas should be able to perform the following:

  • Project and unproject point on a sphere to a projection plane.
  • Convert between latlng and bitmap points on a map.
  • Checking and limiting the range of bitmap points, tile coordinates, latituade & longitude.
  • Calculating the distance between 2 given points.


  • Public Properties
     PropertyDefined by
      bounds : LatLngBounds
    Gets or sets the map bounds in geographical coordinates.
    IProjection
      repeatMap : Boolean
    Get or sets whether projection should repeat tiles horizontally or not.
    IProjection
      scale : Number
    Gets or sets the scale of the map size.
    IProjection
      size : Size
    Gets or sets the size of map image in pixels.
    IProjection
      tileSize : uint
    Gets or sets the tile size.
    IProjection
      transform : ProjectionTransform
    Gets or sets the tranformation object that should be used.
    IProjection
    Public Methods
     MethodDefined by
      
    checkBitmapRange(point:Point, zoom:Number):Point
    IProjection
      
    checkBitmapRangeX(point:Point, zoom:Number):Point
    IProjection
      
    checkBitmapRangeY(point:Point, zoom:Number):Point
    IProjection
      
    IProjection
      
    checkTileRange(tile:Point, zoom:Number):Point
    IProjection
      
    dispose():void
    Releases all the resources accuired by the object.
    IProjection
      
    getBitmapCoordinate(point:Point, zoom:Number):Point
    Returns bitmap coordinate from a projected point.
    IProjection
      
    getDistance(pointA:LatLng, pointB:LatLng):Number
    IProjection
      
    getLatLngFromXY(point:Point, zoom:Number):LatLng
    IProjection
      
    getPlanePoint(point:Point, zoom:Number):Point
    Returns projected point from a bitmap point.
    IProjection
      
    getSize(zoom:Number):Number
    IProjection
      
    getTileCount(zoom:Number):uint
    IProjection
      
    getXYFromLatLng(latlng:LatLng, zoom:Number):Point
    IProjection
      
    projectPoint(latlng:LatLng):Point
    Projects a point on a sphere to a projection plane.
    IProjection
      
    unprojectPoint(point:Point):LatLng
    Unprojects a point on a projection plane to a sphere.
    IProjection
    Property detail
    boundsproperty
    bounds:LatLngBounds  [read-write]

    Gets or sets the map bounds in geographical coordinates.

    The default value is Projection.DEFAULT_MAP_BOUNDS.

    Implementation
        public function get bounds():LatLngBounds
        public function set bounds(value:LatLngBounds):void
    repeatMapproperty 
    repeatMap:Boolean  [read-write]

    Get or sets whether projection should repeat tiles horizontally or not.

    Implementation
        public function get repeatMap():Boolean
        public function set repeatMap(value:Boolean):void
    scaleproperty 
    scale:Number  [read-write]

    Gets or sets the scale of the map size.

    The default value is Projection.DEFAULT_MAP_SCALE.

    Implementation
        public function get scale():Number
        public function set scale(value:Number):void
    sizeproperty 
    size:Size  [read-write]

    Gets or sets the size of map image in pixels.

    The default value is Projection.DEFAULT_MAP_BOUNDS.

    Implementation
        public function get size():Size
        public function set size(value:Size):void
    tileSizeproperty 
    tileSize:uint  [read-write]

    Gets or sets the tile size.

    The default value is Projection.DEFAULT_TILE_SIZE.

    Implementation
        public function get tileSize():uint
        public function set tileSize(value:uint):void
    transformproperty 
    transform:ProjectionTransform  [read-write]

    Gets or sets the tranformation object that should be used.

    The default value is No transformation is defined..

    Implementation
        public function get transform():ProjectionTransform
        public function set transform(value:ProjectionTransform):void
    Method detail
    checkBitmapRange()method
    public function checkBitmapRange(point:Point, zoom:Number):Point

    Parameters
    point:Point
     
    zoom:Number

    Returns
    Point
    checkBitmapRangeX()method 
    public function checkBitmapRangeX(point:Point, zoom:Number):Point

    Parameters
    point:Point
     
    zoom:Number

    Returns
    Point
    checkBitmapRangeY()method 
    public function checkBitmapRangeY(point:Point, zoom:Number):Point

    Parameters
    point:Point
     
    zoom:Number

    Returns
    Point
    checkLatLngRange()method 
    public function checkLatLngRange(latlng:LatLng):LatLng

    Parameters
    latlng:LatLng

    Returns
    LatLng
    checkTileRange()method 
    public function checkTileRange(tile:Point, zoom:Number):Point

    Parameters
    tile:Point
     
    zoom:Number

    Returns
    Point
    dispose()method 
    public function dispose():void

    Releases all the resources accuired by the object.

    getBitmapCoordinate()method 
    public function getBitmapCoordinate(point:Point, zoom:Number):Point

    Returns bitmap coordinate from a projected point.

    Parameters
    point:Point — Point on a projection plane (as Point in radians).
     
    zoom:Number — Zoom level at which to perform the conversion.

    Returns
    Point — A point on a map bitmap.
    getDistance()method 
    public function getDistance(pointA:LatLng, pointB:LatLng):Number

    Parameters
    pointA:LatLng
     
    pointB:LatLng

    Returns
    Number
    getLatLngFromXY()method 
    public function getLatLngFromXY(point:Point, zoom:Number):LatLng

    Parameters
    point:Point
     
    zoom:Number

    Returns
    LatLng
    getPlanePoint()method 
    public function getPlanePoint(point:Point, zoom:Number):Point

    Returns projected point from a bitmap point.

    Parameters
    point:Point — Point on a map bitmap.
     
    zoom:Number — Zoom level at which to perform the conversion.

    Returns
    Point — Point on a projection plane (as Point in radians).
    getSize()method 
    public function getSize(zoom:Number):Number

    Parameters
    zoom:Number

    Returns
    Number
    getTileCount()method 
    public function getTileCount(zoom:Number):uint

    Parameters
    zoom:Number

    Returns
    uint
    getXYFromLatLng()method 
    public function getXYFromLatLng(latlng:LatLng, zoom:Number):Point

    Parameters
    latlng:LatLng
     
    zoom:Number

    Returns
    Point
    projectPoint()method 
    public function projectPoint(latlng:LatLng):Point

    Projects a point on a sphere to a projection plane.

    Parameters
    latlng:LatLng — Point on a sphere (as LatLng in degrees).

    Returns
    Point — A point (as Point in radians) on a projection plane.
    unprojectPoint()method 
    public function unprojectPoint(point:Point):LatLng

    Unprojects a point on a projection plane to a sphere.

    Parameters
    point:Point — Point on a projection plane (as Point in radians).

    Returns
    LatLng — A point (as LatLng in degreees) on a sphere.