Packagenet.systemeD.halcyon.connection
Classpublic class Way
InheritanceWay Inheritance Entity Inheritance flash.events.EventDispatcher



Public Properties
 PropertyDefined by
  angle : Number
[read-only]
Way
  clockwise : Boolean
[read-only]
Way
 Inheritedconnection : Connection
Connection to which this entity belongs.
Entity
 Inheriteddeleted : Boolean = false
Entity
 Inheritedentities : Array
List of entities.
Entity
  entity_type : String = "way"
[static]
Way
 InheritedhasParents : Boolean
Whether this entity has any parents.
Entity
 InheritedhasParentWays : Boolean
Whether this entity has any parents that are Ways.
Entity
 Inheritedid : Number
OSM ID.
Entity
 InheritedisDirty : Boolean
Check if entity is modified since last markClean().
Entity
  length : uint
[read-only]
Way
 Inheritedloaded : Boolean
Is entity fully loaded, or is it just a placeholder reference (as a relation member)?
Entity
 Inheritedlocked : Boolean = false
Lock against purging when off-screen
Entity
 Inheritedmemberships : Array
Returns all relations that this Entity is part of, as array of {relation, position, role}, sorted by position.
Entity
 InheritednumParentWays : uint
How many parents are Ways?
Entity
 InheritedparentObjects : Array
All parents of this entity.
Entity
 InheritedparentRelations : Array
All parents that are Relations
Entity
 InheritedparentsLoaded : Boolean = true
Have all its parents (ie, relations that contain this object as a member, ways that contain this node) been loaded into memory
Entity
 InheritedparentWays : Array
Get array of all Ways of which this object (presumably a node) is a child.
Entity
 Inheritedstatus : String
Entity
 Inheritedtimestamp : String
Most recent modification of the entity (from OSM API).
Entity
 Inheriteduid : Number
User ID who last edited this entity (from OSM API).
Entity
 Inheritedversion : uint
Current version number.
Entity
Public Methods
 MethodDefined by
  
Way(connection:Connection, id:Number, version:uint, tags:Object, loaded:Boolean, nodes:Array, uid:Number, timestamp:String = null)
Way
 Inherited
addParent(parent:Entity):void
Create parent link from this entity to another.
Entity
  
addToEnd(topos:int, node:Node, performAction:Function):void
Way
  
appendNode(node:Node, performAction:Function):uint
Way
 Inherited
countParentObjects(within:Object):uint
How many parents does this entity have that satisfy the "within" constraint?
Entity
  
deleteNodesFrom(start:int, performAction:Function):void
Way
  
endsWith(node:Node):Boolean
Way
  
expandBbox(node:Node):void
Way
 Inherited
findParentRelationsOfType(type:String, role:String = null):Array
Returns parents that are relations, and of the specified type, and of which this entity is the correct role (if provided).
Entity
 Inherited
getDescription():String
Basic description of Entity - should be overriden by subclass.
Entity
  
Way
  
Way
  
Given one node, return the next in sequence, cycling around a loop if necessary.
Way
  
getNode(index:uint):Node
Way
  
Given a P-shaped way, return the index of midway node that one end connects back to.
Way
  
Given one node, return the previous, cycling around a loop if necessary.
Way
 Inherited
Entity
 Inherited
getTag(key:String):String
Retrieve a tag by key.
Entity
 Inherited
getTagArray():Array
Returns an array that duplicates the tags on this entity.
Entity
 Inherited
Entity
 Inherited
getTagsCopy():Object
Returns an object that duplicates the tags on this entity.
Entity
 Inherited
getTagsHash():Object
Entity
  
getType():String
Way
 Inherited
Whether the entity has any tags other than meta-tags (attribution, created_by, source, tiger:...)
Entity
  
hasLockedNodes():Boolean
Way
  
hasOnceOnly(node:Node):Boolean
Way
 Inherited
hasParent(entity:Entity):Boolean
Whether 'entity' is a parent of this Entity.
Entity
 Inherited
hasTags():Boolean
Whether the entity has > 0 tags.
Entity
  
indexOfNode(node:Node):int
Way
  
insertNode(index:uint, node:Node, performAction:Function):void
Way
  
insertNodeAtClosestPosition(newNode:Node, isSnap:Boolean, performAction:Function):int
Finds the 1st way segment which intersects the projected coordinate and adds the node to that segment.
Way
  
intersects(left:Number, right:Number, top:Number, bottom:Number):Boolean
Way
  
isArea():Boolean
Way
 Inherited
isDeleted():Boolean
Whether entity is marked deleted.
Entity
  
isEmpty():Boolean
Way
  
isPShape():Boolean
Whether the way has a loop that joins back midway along its length
Way
  
isType(str:String):Boolean
Way
 Inherited
isUneditedTiger():Boolean
Rough function to detect entities untouched since TIGER import.
Entity
 Inherited
markClean():void
Reset modified flag.
Entity
 Inherited
markDirty():void
Set entity as modified.
Entity
 Inherited
mergeTags(source:Entity, performAction:Function):Boolean
Copy tags from another entity into this one, creating "key=value1; value2" pairs if necessary.
Entity
  
mergeWith(way:Way, topos:int, frompos:int, performAction:Function):void
Merges another way into this one, removing the other one.
Way
  
nullify():void
Way
  
prependNode(node:Node, performAction:Function):uint
Way
  
remove(performAction:Function):void
Way
 Inherited
removeFromParents(performAction:Function):void
Entity
  
removeNode(node:Node, performAction:Function):void
Way
  
removeNodeByIndex(index:uint, performAction:Function, fireEvent:Boolean = true):void
Way
 Inherited
removeParent(parent:Entity):void
Remove parent link.
Entity
 Inherited
renameTag(oldKey:String, newKey:String, performAction:Function):void
Change oldKey=[value] to newKey=[value], with optional undoability.
Entity
 Inherited
renumber(newID:Number, newVersion:uint):void
Assign a new ID and version.
Entity
 Inherited
resume():void
Resume redrawing of the object
Entity
  
reverseNodes(performAction:Function):void
Way
 Inherited
sameTags(entity:Entity):Boolean
Compare tags between two entities.
Entity
 Inherited
setDeletedState(isDeleted:Boolean):void
Mark entity as deleted.
Entity
 Inherited
setStatus(s:String):void
Change entity status.
Entity
 Inherited
setTag(key:String, value:String, performAction:Function):void
Set key=value, with optional undoability.
Entity
  
sliceNodes(start:int, end:int):Array
Way
 Inherited
suspend():void
Temporarily prevent redrawing of the object.
Entity
 Inherited
tagIs(key:String, value:String):Boolean
Entity
  
toString():String
Way
  
update(version:uint, tags:Object, loaded:Boolean, parentsLoaded:Boolean, nodes:Array, uid:Number, timestamp:String = null):void
Way
 Inherited
updateEntityProperties(version:uint, tags:Object, loaded:Boolean, parentsLoaded:Boolean, uid:Number, timestamp:String):void
Set a bunch of properties in one hit.
Entity
  
within(left:Number, right:Number, top:Number, bottom:Number):Boolean
Way
Protected Methods
 MethodDefined by
 Inherited
Implement nullifybehaviour: delete tags, etc.
Entity
Property detail
angleproperty
angle:Number  [read-only]Implementation
    public function get angle():Number
clockwiseproperty 
clockwise:Boolean  [read-only]Implementation
    public function get clockwise():Boolean
entity_typeproperty 
public static var entity_type:String = "way"
lengthproperty 
length:uint  [read-only]Implementation
    public function get length():uint
Constructor detail
Way()constructor
public function Way(connection:Connection, id:Number, version:uint, tags:Object, loaded:Boolean, nodes:Array, uid:Number, timestamp:String = null)Parameters
connection:Connection
 
id:Number
 
version:uint
 
tags:Object
 
loaded:Boolean
 
nodes:Array
 
uid:Number
 
timestamp:String (default = null)
Method detail
addToEnd()method
public function addToEnd(topos:int, node:Node, performAction:Function):voidParameters
topos:int
 
node:Node
 
performAction:Function
appendNode()method 
public function appendNode(node:Node, performAction:Function):uintParameters
node:Node
 
performAction:Function

Returns
uint
deleteNodesFrom()method 
public function deleteNodesFrom(start:int, performAction:Function):voidParameters
start:int
 
performAction:Function
endsWith()method 
public function endsWith(node:Node):BooleanParameters
node:Node

Returns
Boolean
expandBbox()method 
public function expandBbox(node:Node):voidParameters
node:Node
getFirstNode()method 
public function getFirstNode():Node

Returns
Node
getLastNode()method 
public function getLastNode():Node

Returns
Node
getNextNode()method 
public function getNextNode(node:Node):Node

Given one node, return the next in sequence, cycling around a loop if necessary.

Parameters
node:Node

Returns
Node
getNode()method 
public function getNode(index:uint):NodeParameters
index:uint

Returns
Node
getPJunctionNodeIndex()method 
public function getPJunctionNodeIndex():uint

Given a P-shaped way, return the index of midway node that one end connects back to.

Returns
uint
getPrevNode()method 
public function getPrevNode(node:Node):Node

Given one node, return the previous, cycling around a loop if necessary.

Parameters
node:Node

Returns
Node
getType()method 
public override function getType():String

Returns
String
hasLockedNodes()method 
public function hasLockedNodes():Boolean

Returns
Boolean
hasOnceOnly()method 
public function hasOnceOnly(node:Node):BooleanParameters
node:Node

Returns
Boolean
indexOfNode()method 
public function indexOfNode(node:Node):intParameters
node:Node

Returns
int
insertNode()method 
public function insertNode(index:uint, node:Node, performAction:Function):voidParameters
index:uint
 
node:Node
 
performAction:Function
insertNodeAtClosestPosition()method 
public function insertNodeAtClosestPosition(newNode:Node, isSnap:Boolean, performAction:Function):int

Finds the 1st way segment which intersects the projected coordinate and adds the node to that segment. If snap is specified then the node is moved to exactly bisect the segment.

Parameters
newNode:Node
 
isSnap:Boolean
 
performAction:Function

Returns
int
intersects()method 
public function intersects(left:Number, right:Number, top:Number, bottom:Number):BooleanParameters
left:Number
 
right:Number
 
top:Number
 
bottom:Number

Returns
Boolean
isArea()method 
public function isArea():Boolean

Returns
Boolean
isEmpty()method 
public override function isEmpty():Boolean

Returns
Boolean
isPShape()method 
public function isPShape():Boolean

Whether the way has a loop that joins back midway along its length

Returns
Boolean
isType()method 
public override function isType(str:String):BooleanParameters
str:String

Returns
Boolean
mergeWith()method 
public function mergeWith(way:Way, topos:int, frompos:int, performAction:Function):void

Merges another way into this one, removing the other one.

Parameters
way:Way
 
topos:int
 
frompos:int
 
performAction:Function
nullify()method 
public override function nullify():void
prependNode()method 
public function prependNode(node:Node, performAction:Function):uintParameters
node:Node
 
performAction:Function

Returns
uint
remove()method 
public override function remove(performAction:Function):voidParameters
performAction:Function
removeNode()method 
public function removeNode(node:Node, performAction:Function):voidParameters
node:Node
 
performAction:Function
removeNodeByIndex()method 
public function removeNodeByIndex(index:uint, performAction:Function, fireEvent:Boolean = true):voidParameters
index:uint
 
performAction:Function
 
fireEvent:Boolean (default = true)
reverseNodes()method 
public function reverseNodes(performAction:Function):voidParameters
performAction:Function
sliceNodes()method 
public function sliceNodes(start:int, end:int):ArrayParameters
start:int
 
end:int

Returns
Array
toString()method 
public override function toString():String

Returns
String
update()method 
public function update(version:uint, tags:Object, loaded:Boolean, parentsLoaded:Boolean, nodes:Array, uid:Number, timestamp:String = null):voidParameters
version:uint
 
tags:Object
 
loaded:Boolean
 
parentsLoaded:Boolean
 
nodes:Array
 
uid:Number
 
timestamp:String (default = null)
within()method 
public override function within(left:Number, right:Number, top:Number, bottom:Number):BooleanParameters
left:Number
 
right:Number
 
top:Number
 
bottom:Number

Returns
Boolean