8907c86b1307dcf586869ba028d4bf6784ffa08a
[potlatch2.git] / net / systemeD / halcyon / POI.as
1 package net.systemeD.halcyon {
2
3         public class POI extends Object {
4
5                 import flash.display.*;
6                 import flash.text.TextField;
7                 import flash.text.TextFormat;
8                 import net.systemeD.halcyon.styleparser.*;
9
10                 public var id:int;
11                 public var tags:Object;
12                 public var clean:Boolean=true;                          // altered since last upload?
13                 public var uploading:Boolean=false;                     // currently uploading?
14                 public var locked:Boolean=false;                        // locked against upload?
15                 public var version:uint=0;                                      // version number?
16                 public var map:Map;                                                     // reference to parent map
17                 public var icon:Sprite;                                         // instance in display list
18                 public var name:Sprite;                                         //  |
19
20                 [Embed(source="fonts/DejaVuSans.ttf", fontFamily="DejaVu", fontWeight="normal", mimeType="application/x-font-truetype")]
21                 public static var DejaVu:Class;
22                 public var nameformat:TextFormat;
23
24                 public function POI(id:int,version:int,lon:Number,lat:Number,tags:Object,map:Map) {
25                         this.id=id;
26                         this.version=version;
27                         this.map=map;
28                         this.tags=tags;
29                         if (map.nodes[id]) {
30                                 // ** already exists - do stuff if it's moved, or in a way
31                         } else {
32                                 map.nodes[id]=new Node(id,lon,map.lat2latp(lat),tags,version);
33                         }
34                 }
35                 
36                 // redraw
37         }
38 }