Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc

# Numerous always-ignore extensions
###################
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~

*.sass-cache
# Folders to ignore
###################
.hg
.svn
.CVS
# OS or Editor folders
###################
.DS_Store
Icon?
Thumbs.db
ehthumbs.db
nbproject
.cache
.project
.settings
.tmproj
*.esproj
*.sublime-project
*.sublime-workspace
# Dreamweaver added files
###################
_notes
dwsync.xml
# Komodo
###################
*.komodoproject
.komodotools
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This project takes GPX files and parses them into ActionScript objects.
This project takes GPX files and parses them into ActionScript objects.

Created by Ryan Stewart and Simeon Bateman.

Expand Down
2 changes: 1 addition & 1 deletion examples/README
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
These examples are provided to show how to use the GpxAs3 library.
These examples are provided to show how to use the GpxAs3 library.

Most of them will require the Google Maps SDK which can be found here - http://code.google.com/apis/maps/documentation/flash/
50 changes: 25 additions & 25 deletions src/com/adobe/gpslib/GPX.as
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ package com.adobe.gpslib
{
import com.adobe.gpslib.gpx.events.ParseEvent;
import com.adobe.gpslib.gpx.loader.GPXLoaderFactory;

import flash.events.EventDispatcher;

[Bindable]
public class GPX
{
{
private var _creator : String;
private var _version : String;
private var _name : String;
Expand All @@ -53,78 +53,78 @@ package com.adobe.gpslib
private var _arrWaypoints : Array = new Array();
private var _arrTracks : Array = new Array();
private var _arrRoutes : Array = new Array();

public function GPX()
{

}

public static function load(gpx_xml:XML) : GPX
{
var gpxLoader : GPXLoaderFactory = new GPXLoaderFactory();
return gpxLoader.loadGPX(gpx_xml);
}

public static function toXMLString(gpx:GPX) : XML
{
return GPXLoaderFactory.toXMLString(gpx);
}

/******
* Getters and Setters
*****/

public function set creator (value:String) : void { _creator = value; }
public function get creator () : String { return _creator; }

public function set version (value:String) : void { _version = value; }
public function get version () : String { return _version; }

public function set name (value:String) : void { _name = value; }
public function get name () : String { return _name; }

public function set description (value:String) : void { _description = value; }
public function get description () : String { return _description; }

public function set author (value:String) : void { _author = value; }
public function get author () : String { return _author; }

public function set email (value:String) : void { _email = value; }
public function get email () : String { return _email; }

public function set link (value:String) : void { _link = value; }
public function get link () : String { return _link; }

public function set linkText (value:String) : void { _linkText = value; }
public function get linkText () : String { return _linkText; }

public function set linkType (value : String) : void { _linkType = value; }
public function get linkType () : String { return _linkType; }

public function set time (value:Date) : void { _time = value; }
public function get time () : Date { return _time; }

public function set keywords (value:String) : void { _keywords = value; }
public function get keywords () : String { return _keywords; }

public function set minLatitude (value:Number) : void { _minLatitude = value; }
public function get minLatitude () : Number { return _minLatitude; }

public function set minLongitude (value:Number) : void { _minLongitude = value; }
public function get minLongitude () : Number { return _minLongitude; }

public function set maxLatitude (value:Number) : void { _maxLatitude = value; }
public function get maxLatitude () : Number { return _maxLatitude; }

public function set maxLongitude (value:Number) : void { _maxLongitude = value; }
public function get maxLongitude () : Number { return _maxLongitude; }

public function set arrWaypoints( value:Array ) : void { _arrWaypoints = value; }
public function get arrWaypoints () : Array { return _arrWaypoints }

public function set arrTracks( value:Array ) : void { _arrTracks = value; }
public function get arrTracks() : Array { return _arrTracks; }

public function set arrRoutes( value:Array ) : void { _arrRoutes = value; }
public function get arrRoutes() : Array { return _arrRoutes; }
}
Expand Down
8 changes: 4 additions & 4 deletions src/com/adobe/gpslib/GPXService.as
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ package com.adobe.gpslib
{
import com.adobe.gpslib.gpx.events.ParseEvent;
import com.adobe.gpslib.gpx.loader.GPXLoaderFactory;

import flash.events.EventDispatcher;

[Event(name="parseComplete", type="com.adobe.gpslib.gpx.events.ParseEvent")]
public class GPXService extends EventDispatcher
{
public function GPXService()
{
}

public function load(gpx_xml:XML) : void
{
var gpxLoader : GPXLoaderFactory = new GPXLoaderFactory();
var gpx : GPX = gpxLoader.loadGPX(gpx_xml);
var e : ParseEvent = new ParseEvent(ParseEvent.PARSE_COMPLETE, gpx);
dispatchEvent(e);
}

}
}
64 changes: 32 additions & 32 deletions src/com/adobe/gpslib/gpx/Route.as
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.adobe.gpslib.gpx
{


public class Route
{
private var _name : String;
Expand All @@ -10,126 +10,126 @@ package com.adobe.gpslib.gpx
private var _source : String; //<src>
private var _link : String;
private var _linkText : String;
private var _linkType : String;
private var _linkType : String;
private var _number : Number; // track number?
private var _type : String;
private var _type : String;
private var _routePoint : Array; // Array of Track Points (waypoints)

public function Route(name:String, routePoint : Array)
{
this.name = name;
this.routePoint = routePoint;
this.routePoint = routePoint;
}

/*******
* Getters and Setters
**/

/* Name */

public function set name (value:String) : void
{
this._name = value;
}

public function get name () : String
{
return this._name;
}

/* Comment */

public function set comment (value:String) : void
{
this._comment = value;
}

public function get comment () : String
{
return this._comment;
}

/* Description */

public function set description (value:String) : void
{
this._description = value;
}

public function get description () : String
{
return this._description;
}

/* Source */

public function set source (value:String) : void
{
this._source = value;
}

public function get source () : String
{
return this._source;
}

/* Url */

public function set link (value:String) : void
{
this._link = value;
}

public function get link () : String
{
return this._link;
}

/* UrlName */

public function set linkText (value:String) : void
{
this._linkText = value;
}

public function get linkText () : String
{
return this._linkText;
}

/* Link Type */
public function set linkType (value:String) : void
{
this._linkType = value;
}

public function get linkType () : String
{
return this._linkType;
}

/* Route Number? */
public function set number (value:Number) : void
{
this._number = value;
}
}

public function get number () : Number
{
return this._number;
}

/* Type */
public function set type (value:String) : void
{
this._type = value;
}

public function get type () : String
{
return this._type;
}

/* Route Point */
public function set routePoint (value:Array) : void
{
Expand Down
Loading