private var parents:Dictionary = new Dictionary();
public var locked:Boolean = false; // lock against purging when off-screen
public var deleted:Boolean = false;
+// public var parentsLoaded:Boolean = true; // are all its parents in memory?
public function Entity(id:Number, version:uint, tags:Object, loaded:Boolean, uid:Number, timestamp:String) {
this._id = id;
var node:Node, newNode:Node;
var unusedNodes:Object={};
+ var minlon:Number=map.bounds.@minlon;
+ var maxlon:Number=map.bounds.@maxlon;
+ var minlat:Number=map.bounds.@minlat;
+ var maxlat:Number=map.bounds.@maxlat;
+
for each(var relData:XML in map.relation) {
id = Number(relData.@id);
version = uint(relData.@version);
nodeData.@timestamp);
if ( node == null || !node.loaded) {
+// newNode.parentsLoaded=newNode.within(minlon,maxlon,minlat,maxlat);
+// ** updateEntityProperties will need to do parentsLoaded as well
setOrUpdateNode(newNode, true);
} else {
// the node's already in memory, but store it in case one of the new ways needs it
+// if (newNode.within(minlon,maxlon,minlat,maxlat)) newNode.parentsLoaded=true;
unusedNodes[id]=newNode;
}
}