Packagenet.systemeD.halcyon.connection
Classpublic class XMLConnection
InheritanceXMLConnection Inheritance XMLBaseConnection Inheritance Connection Inheritance flash.events.EventDispatcher
SubclassesSnapshotConnection

XMLConnection provides all the methods required to connect to a live OSM server. See OSMConnection for connecting to a read-only .osm file



Public Properties
 PropertyDefined by
 InheritedADDED_TO_RELATION : String = "added_to_relation"
[static]
Connection
 InheritedapiBase : String
Connection
 InheritedDATA_CLEAN : String = "data_clean"
[static]
Connection
 InheritedDATA_DIRTY : String = "data_dirty"
[static]
Connection
 InheritedENTITY_DRAGGED : String = "entity_dragged"
[static]
Connection
 InheritedisDirty : Boolean
Connection
 InheritedLOAD_COMPLETED : String = "load_completed"
[static]
Connection
 InheritedLOAD_STARTED : String = "load_started"
[static]
Connection
 Inheritedname : String
Connection
 InheritedNEW_CHANGESET : String = "new_changeset"
[static]
Connection
 InheritedNEW_CHANGESET_ERROR : String = "new_changeset_error"
[static]
Connection
 InheritedNEW_MARKER : String = "new_marker"
[static]
Connection
 InheritedNEW_NODE : String = "new_node"
[static]
Connection
 InheritedNEW_POI : String = "new_poi"
[static]
Connection
 InheritedNEW_RELATION : String = "new_relation"
[static]
Connection
 InheritedNEW_WAY : String = "new_way"
[static]
Connection
 InheritedNODE_ALTERED : String = "node_altered"
[static]
Connection
 Inheritednodecount : int = 0
Connection
 InheritedNODE_DELETED : String = "node_deleted"
[static]
Connection
 InheritedNODE_MOVED : String = "node_moved"
[static]
Connection
 InheritedNODE_RENUMBERED : String = "node_renumbered"
[static]
Connection
 Inheritedrelationcount : int = 0
Connection
 InheritedRELATION_DELETED : String = "relation_deleted"
[static]
Connection
 InheritedRELATION_MEMBER_ADDED : String = "relation_member_added"
[static]
Connection
 InheritedRELATION_MEMBER_REMOVED : String = "relation_member_deleted"
[static]
Connection
 InheritedRELATION_RENUMBERED : String = "relation_renumbered"
[static]
Connection
 InheritedREMOVED_FROM_RELATION : String = "removed_from_relation"
[static]
Connection
 InheritedRESUME_REDRAW : String = "resume_redraw"
[static]
Connection
 InheritedSAVE_COMPLETED : String = "save_completed"
[static]
Connection
 InheritedSAVE_STARTED : String = "save_started"
[static]
Connection
 InheritedserverName : String
Connection
 InheritedSTATUS_CHANGED : String = "status_changed"
[static]
Connection
 InheritedstatusFetcher : StatusFetcher
Connection
 InheritedSUSPEND_REDRAW : String = "suspend_redraw"
[static]
Connection
 InheritedTAG_CHANGED : String = "tag_changed"
[static]
Connection
 InheritedTRACES_LOADED : String = "traces_loaded"
[static]
Connection
 Inheritedwaycount : int = 0
Connection
 InheritedWAY_DELETED : String = "way_deleted"
[static]
Connection
 InheritedWAY_NODE_ADDED : String = "way_node_added"
[static]
Connection
 InheritedWAY_NODE_REMOVED : String = "way_node_removed"
[static]
Connection
 InheritedWAY_RENUMBERED : String = "way_renumbered"
[static]
Connection
 InheritedWAY_REORDERED : String = "way_reordered"
[static]
Connection
Protected Properties
 PropertyDefined by
 InheritedapiBaseURL : String
Connection
  appID : OAuthConsumer
XMLConnection
  authToken : OAuthToken
XMLConnection
 InheritednextNegative : Number
Connection
 Inheritedparams : Object
Connection
 InheritedpolicyURL : String
Connection
 Inheritedtraces_loaded : Boolean = false
Connection
Public Methods
 MethodDefined by
  
XMLConnection(name:String, api:String, policy:String, initparams:Object)
XMLConnection
 Inherited
addDupe(node:Node):void
Connection
 Inherited
cancelUpload():void
Connection
  
XMLConnection
  
createChangeset(tags:Object):void
XMLConnection
 Inherited
createMarker(tags:Object, lat:Number, lon:Number, id:Number):Marker
Create a new marker.
Connection
 Inherited
createNode(tags:Object, lat:Number, lon:Number, performCreate:Function):Node
Connection
 Inherited
createRelation(tags:Object, members:Array, performCreate:Function):Relation
Connection
 Inherited
createWay(tags:Object, nodes:Array, performCreate:Function):Way
Connection
 Inherited
Connection
  
fetchTrace(id:Number, callback:Function):void
XMLConnection
  
fetchUserTraces(refresh:Boolean = false):void
XMLConnection
 Inherited
Connection
 Inherited
Connection
 Inherited
getAllNodeIDs():Array
Connection
 Inherited
Connection
 Inherited
getAllWayIDs():Array
Connection
 Inherited
getEnvironment(responder:Responder):void
Connection
 Inherited
getMarker(id:Number):Marker
Connection
 Inherited
getMatchingRelationIDs(match:Object):Array
Returns all available relations that match all of {k1: [v1,v2,...], k2: [v1...] ...} where p1 is an array [v1, v2, v3...]
Connection
 Inherited
getNode(id:Number):Node
Connection
 Inherited
getNodesAtPosition(lat:Number, lon:Number):Array
Connection
 Inherited
getObjectsByBbox(left:Number, right:Number, top:Number, bottom:Number):Object
Connection
 Inherited
getParam(name:String, defaultValue:String):String
Connection
 Inherited
getRelation(id:Number):Relation
Connection
 Inherited
getTraces():Array
Connection
 Inherited
getWay(id:Number):Way
Connection
 Inherited
goToEntity(entity:Entity):void
Connection
  
hasAccessToken():Boolean
XMLConnection
 Inherited
Connection
  
loadBbox(left:Number, right:Number, top:Number, bottom:Number):void
XMLConnection
 Inherited
loadEntity(entity:Entity):void
Connection
  
loadEntityByID(type:String, id:Number):void
XMLConnection
 Inherited
markClean():void
Connection
 Inherited
markDirty():void
Connection
 Inherited
nodesAtPosition(lat:Number, lon:Number):uint
Connection
 Inherited
purgeIfFull(left:Number, right:Number, top:Number, bottom:Number):void
Purge all data if number of ways exceeds limit
Connection
 Inherited
purgeOutside(left:Number, right:Number, top:Number, bottom:Number):void
Connection
 Inherited
registerPOI(node:Node):void
Connection
 Inherited
removeDupe(node:Node):void
Connection
 Inherited
retryUpload(e:Event = null):void
Connection
 Inherited
Connection
 Inherited
Connection
 Inherited
sendEvent(e:*, queue:Boolean):void
Connection
  
setAccessToken(key:String, secret:String):void
XMLConnection
  
setAuthToken(id:Object):void
XMLConnection
 Inherited
unregisterPOI(node:Node):void
Connection
  
Create XML changeset and send it to the server.
XMLConnection
Protected Methods
 MethodDefined by
 Inherited
addTrace(t:Object):void
Connection
 Inherited
clearTraces():void
Connection
 Inherited
Connection
 Inherited
findEntity(type:String, id:*):Entity
Connection
 Inherited
Connection
 Inherited
isBboxLoaded(left:Number, right:Number, top:Number, bottom:Number):Boolean
Has the data within this bbox already been loaded?
Connection
 Inherited
killEntity(entity:Entity):void
Connection
 Inherited
killNode(id:Number):void
Connection
 Inherited
killRelation(id:Number):void
Connection
 Inherited
killWay(id:Number):void
Connection
 Inherited
killWayWithNodes(id:Number):void
Connection
 Inherited
loadedMap(event:Event):void
XMLBaseConnection
 Inherited
markBboxLoaded(left:Number, right:Number, top:Number, bottom:Number):void
Mark that bbox is loaded
Connection
 Inherited
XMLBaseConnection
 Inherited
renumberNode(oldID:Number, newID:Number, version:uint):void
Connection
 Inherited
renumberRelation(oldID:Number, newID:Number, version:uint):void
Connection
 Inherited
renumberWay(oldID:Number, newID:Number, version:uint):void
Connection
 Inherited
setActiveChangeset(changeset:Changeset):void
Connection
 Inherited
setNode(node:Node, queue:Boolean):void
Connection
 Inherited
setOrUpdateNode(newNode:Node, queue:Boolean):void
Connection
 Inherited
setRelation(relation:Relation, queue:Boolean):void
Connection
 Inherited
setWay(way:Way, queue:Boolean):void
Connection
 Inherited
throwAlreadyDeletedError(entity:Entity, message:String):void
Connection
 Inherited
throwBugError(message:String):void
Connection
 Inherited
throwChangesetError(message:String):void
Connection
 Inherited
throwConflictError(entity:Entity, serverVersion:uint, message:String):void
Connection
 Inherited
throwEntityError(entity:Entity, message:String):void
Connection
 Inherited
throwInUseError(entity:Entity, message:String):void
Connection
 Inherited
throwServerError(message:String):void
Connection
Protected Constants
 ConstantDefined by
 InheritedMAXWAYS : uint = 3000
maximum number of ways to keep in memory before purging
Connection
Property detail
appIDproperty
protected var appID:OAuthConsumer
authTokenproperty 
protected var authToken:OAuthToken
Constructor detail
XMLConnection()constructor
public function XMLConnection(name:String, api:String, policy:String, initparams:Object)Parameters
name:String
 
api:String
 
policy:String
 
initparams:Object
Method detail
closeChangeset()method
public override function closeChangeset():void
createChangeset()method 
public override function createChangeset(tags:Object):voidParameters
tags:Object
fetchTrace()method 
public override function fetchTrace(id:Number, callback:Function):voidParameters
id:Number
 
callback:Function
fetchUserTraces()method 
public override function fetchUserTraces(refresh:Boolean = false):voidParameters
refresh:Boolean (default = false)
hasAccessToken()method 
public override function hasAccessToken():Boolean

Returns
Boolean
loadBbox()method 
public override function loadBbox(left:Number, right:Number, top:Number, bottom:Number):voidParameters
left:Number
 
right:Number
 
top:Number
 
bottom:Number
loadEntityByID()method 
public override function loadEntityByID(type:String, id:Number):voidParameters
type:String
 
id:Number
setAccessToken()method 
public override function setAccessToken(key:String, secret:String):voidParameters
key:String
 
secret:String
setAuthToken()method 
public override function setAuthToken(id:Object):voidParameters
id:Object
uploadChanges()method 
public override function uploadChanges():*

Create XML changeset and send it to the server. Returns the XML string for use in the 'Show data' button. (We don't mind what's returned as long as it implements .toString() )

Returns
*