Module: nagvis Branch: master Commit: eadf84ed6ca2e45f273626232726514386dbcfa8 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=eadf84ed6ca2e45f273626232726514386dbcfa8
Author: Roman Kyrylych <[email protected]> Date: Thu Aug 13 15:43:44 2009 +0300 gmap: Load/save actions from/to locations.xml Signed-off-by: Roman Kyrylych <[email protected]> --- share/netmap/Location.php | 14 +++++++----- uifx/src/modules/gmap/domain/Location.as | 31 +++++++++++++++-------------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/share/netmap/Location.php b/share/netmap/Location.php index e562102..eb5d438 100644 --- a/share/netmap/Location.php +++ b/share/netmap/Location.php @@ -33,16 +33,18 @@ class Location public $label; public $address; public $description; + public $action; public $object; public $state; - public function __construct($id = "", $point = "", $label = "", $address = "", $description = "", $object = null, $state = self::STATE_UNKNOWN) + public function __construct($id = "", $point = "", $label = "", $address = "", $description = "", $action = "", $object = null, $state = self::STATE_UNKNOWN) { $this->id = $id; $this->point = $point; $this->label = $label; $this->address = $address; $this->description = $description; + $this->action = $action; $this->object = $object; $this->state = $state; } @@ -80,10 +82,9 @@ class Location } } - return new Location((string)$node['id'], - (string)$node['point'], (string)$node['label'], - (string)$node['address'], (string)$node['description'], - $object); + return new Location((string)$node['id'], (string)$node['point'], + (string)$node['label'], (string)$node['address'], + (string)$node['description'], (string)$node['action'], $object); } private function toXML($parent) @@ -94,6 +95,7 @@ class Location @$node->addAttribute('label', $this->label); @$node->addAttribute('address', $this->address); @$node->addAttribute('description', $this->description); + @$node->addAttribute('action', $this->action); if (is_object($this->object)) $this->object->toXML($node); @@ -238,7 +240,7 @@ class Location $locations = array(); foreach(Geocode::resolve($address) as $location) - $locations[] = new Location("", $location['point'], "", $location['address'], ""); + $locations[] = new Location("", $location['point'], "", $location['address'], "", ""); return $locations; } diff --git a/uifx/src/modules/gmap/domain/Location.as b/uifx/src/modules/gmap/domain/Location.as index 7e2eb19..4e1a7c5 100644 --- a/uifx/src/modules/gmap/domain/Location.as +++ b/uifx/src/modules/gmap/domain/Location.as @@ -38,9 +38,9 @@ package modules.gmap.domain private var _label : String; private var _address : String; private var _description : String; + private var _action : String; private var _object : Object; private var _state : Number; - private var _action : String; public function get id() : String { @@ -112,6 +112,20 @@ package modules.gmap.domain } } + public function get action():String + { + return _action; + } + + public function set action(value:String):void + { + if(_action !== value) + { + _action = value; + dispatchEvent(new LocationEvent('change', this)); + } + } + public function get object() : Object { return this._object; @@ -140,20 +154,6 @@ package modules.gmap.domain } } - public function get action():String - { - return _action; - } - - public function set action(value:String):void - { - if(_action !== value) - { - _action = value; - dispatchEvent(new LocationEvent('change', this)); - } - } - public function update(value : Location) : void { this.id = value.id; @@ -161,6 +161,7 @@ package modules.gmap.domain this.label = value.label; this.address = value.address; this.description = value.description; + this.action = value.action; this.object = value.object; this.state = value.state; } ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
