Packagecom.afcomponents.umap.providers.microsoft
Classpublic class MapPointProxy
InheritanceMapPointProxy Inheritance flash.events.EventDispatcher

Special class capable of proxying Bing service requests through a server side proxy script. This script should be able to perform a SOAP query to a MapPoint service. Another requirement is the ability to perform the digest authentication with the destination service.

MapPointProxy is required for all Bing services:


Example
Here is a quick example of the MapPointProxy intialization:
 import com.afcomponents.umap.providers.microsoft.MapPointProxy;
 import com.afcomponents.umap.providers.microsoft.MapPointTokenRequest;
 import com.afcomponents.umap.events.MapPointProxyEvent;
 
 // initalize proxy
 MapPointProxy.initialize("http://www.umapper.com/demo/dmitry/msproxy.php");
 
 // request token, and wait for valid token
 var proxy:MapPointProxy = MapPointProxy.getInstance();
 proxy.getToken();
 proxy.addEventListener(MapPointProxyEvent.REQUEST_COMPLETE, proxyComplete);
 
 // wait for token ready event
 function proxyComplete(event:MapPointProxyEvent):void
 {
   if (event.request is MapPointTokenRequest)
   {
     // token ready!
     trace("token: " + proxy.getToken());
   }
 }
 
You can also define the token in the initialize() method as a second parameter, if it was previoulsy obtained by other means.

See also

com.afcomponents.umap.providers.microsoft.BingProvider
com.afcomponents.umap.display.geocodermanager.BingGeocodeService
com.afcomponents.umap.display.routemanager.BingRouteService


Public Properties
 PropertyDefined by
  data : String
[read-only]
MapPointProxy
  loader : URLLoader
[read-only]
MapPointProxy
  loading : Boolean
[read-only]
MapPointProxy
  request : IMapPointRequest
[read-only]
MapPointProxy
  TOKEN : String
[static]
MapPointProxy
Public Methods
 MethodDefined by
  
MapPointProxy(proxyURL:String, prv:PrivateClass)
MapPointProxy
  
[static]
MapPointProxy
  
getToken():String
MapPointProxy
  
initialize(proxyURL:String, token:String = ""):MapPointProxy
[static]
MapPointProxy
  
sendRequest(request:IMapPointRequest):Boolean
MapPointProxy
  
setToken(token:String):void
MapPointProxy
Property detail
dataproperty
data:String  [read-only]Implementation
    public function get data():String
loaderproperty 
loader:URLLoader  [read-only]Implementation
    public function get loader():URLLoader
loadingproperty 
loading:Boolean  [read-only]Implementation
    public function get loading():Boolean
requestproperty 
request:IMapPointRequest  [read-only]Implementation
    public function get request():IMapPointRequest
TOKENproperty 
public static var TOKEN:String
Constructor detail
MapPointProxy()constructor
public function MapPointProxy(proxyURL:String, prv:PrivateClass)Parameters
proxyURL:String
 
prv:PrivateClass
Method detail
getInstance()method
public static function getInstance():MapPointProxy

Returns
MapPointProxy
getToken()method 
public function getToken():String

Returns
String
initialize()method 
public static function initialize(proxyURL:String, token:String = ""):MapPointProxyParameters
proxyURL:String
 
token:String (default = "")

Returns
MapPointProxy
sendRequest()method 
public function sendRequest(request:IMapPointRequest):BooleanParameters
request:IMapPointRequest

Returns
Boolean
setToken()method 
public function setToken(token:String):voidParameters
token:String