Packagecom.myflashlab.air.extensions.gps
Classpublic class GeocodingManager
InheritanceGeocodingManager Inheritance Object

This class is responsible for getting geocoding. find sample usage codes in Gps class.



Public Methods
 MethodDefined By
  
GeocodingManager($context:ExtensionContext)
do not try to initialize this class manually.
GeocodingManager
  
direct($address:String, $onResult:Function):void
Geocoding direct means converting an address into Gps latitude/longitude
GeocodingManager
  
reverse($latitude:Number, $longtitude:Number, $onResult:Function):void
Geocoding reverse means converting Gps cordinates into human readable address
GeocodingManager
Constructor Detail
GeocodingManager()Constructor
public function GeocodingManager($context:ExtensionContext)

do not try to initialize this class manually. instead, init the main Gps class and access this class using Gps.geocoding

Parameters
$context:ExtensionContext
Method Detail
direct()method
public function direct($address:String, $onResult:Function):void

Geocoding direct means converting an address into Gps latitude/longitude

Parameters

$address:String
 
$onResult:Function

See also


Example
The following example shows how to use Gps.geocoding.direct
         Gps.geocoding.direct("Sydney", onResultGeocodingDirect);
         
         function onResultGeocodingDirect($location:Array):void
         {
             // there might be more than one location found for this address
             trace("$location.length = " + $location.length);
             trace("$location = " + JSON.stringify($location));
             trace("-----------------------------");
         }
         
reverse()method 
public function reverse($latitude:Number, $longtitude:Number, $onResult:Function):void

Geocoding reverse means converting Gps cordinates into human readable address

Parameters

$latitude:Number
 
$longtitude:Number
 
$onResult:Function

See also


Example
The following example shows how to use Gps.geocoding.reverse
         Gps.geocoding.reverse(-33.7969235, 150.9224326, onResultGeocodingReverse);
         
         function onResultGeocodingReverse($address:Array):void
         {
             // there might be more than one address found for this location
             trace("$address.length = " + $address.length);
             trace("$address = " + JSON.stringify($address));
             trace("-----------------------------");
         }