<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: A GPX Parser in ActionScript 3</title>
	<atom:link href="http://blog.robskelly.com/2009/01/a-gpx-parser-in-actionscript-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.robskelly.com/2009/01/a-gpx-parser-in-actionscript-3/</link>
	<description>Flash, Flex, Geography and GIS</description>
	<lastBuildDate>Sat, 24 Jul 2010 00:39:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: lucas</title>
		<link>http://blog.robskelly.com/2009/01/a-gpx-parser-in-actionscript-3/comment-page-1/#comment-136</link>
		<dc:creator>lucas</dc:creator>
		<pubDate>Fri, 03 Apr 2009 18:07:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.robskelly.com/?p=38#comment-136</guid>
		<description>nice job - this saved me a ton of time.</description>
		<content:encoded><![CDATA[<p>nice job &#8211; this saved me a ton of time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://blog.robskelly.com/2009/01/a-gpx-parser-in-actionscript-3/comment-page-1/#comment-89</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Sun, 01 Mar 2009 22:11:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.robskelly.com/?p=38#comment-89</guid>
		<description>Assuming you have your GPX file loaded into a String (called data, below; loaded using URLLoader, or whatever), you create a GPX object, then access the tracks, routes and waypoints directly. Tracks contain a list of segments, each of which contains a list of points. Routs contain a list of waypoints.

&lt;pre&gt;
// create a gpx object
var gpx      : GPX      = GPX.parse(data);

// get the tracks
var tracks   : Array    = gpx.tracks;
var segments : Array    = tracks[0].segments;
var points   : Array    = segments[0].points;
var point    : Waypoint = points[0];

// or

// get the routes
var routes : Array    = gpx.routes;
var points : Array    = routes[0].points;
var point  : Waypoint = points[0];
&lt;/pre&gt;

You can easily convert a point&#039;s location to a Google Maps LatLng object, if you want to display your routes on a map.

&lt;pre&gt;
// create an array to hold the LatLngs and iterate through the points,
// converting each to a LatLng and adding it to the new array
var latLngs : Array = new Array();
for each(var point:Waypoint in points)
  latLngs.push(new LatLng(point.lat,point.lon));

// create a Polyline with the LatLng array
var polyline : Polyline = new Polyline(latLngs);

// add it to your map
map .addOverlay(polyline);
&lt;/pre&gt;

The Google Maps API reference is &lt;a href=&quot;http://code.google.com/apis/maps/documentation/flash/reference.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, if you need it.</description>
		<content:encoded><![CDATA[<p>Assuming you have your GPX file loaded into a String (called data, below; loaded using URLLoader, or whatever), you create a GPX object, then access the tracks, routes and waypoints directly. Tracks contain a list of segments, each of which contains a list of points. Routs contain a list of waypoints.</p>
<pre>
// create a gpx object
var gpx      : GPX      = GPX.parse(data);

// get the tracks
var tracks   : Array    = gpx.tracks;
var segments : Array    = tracks[0].segments;
var points   : Array    = segments[0].points;
var point    : Waypoint = points[0];

// or

// get the routes
var routes : Array    = gpx.routes;
var points : Array    = routes[0].points;
var point  : Waypoint = points[0];
</pre>
<p>You can easily convert a point&#8217;s location to a Google Maps LatLng object, if you want to display your routes on a map.</p>
<pre>
// create an array to hold the LatLngs and iterate through the points,
// converting each to a LatLng and adding it to the new array
var latLngs : Array = new Array();
for each(var point:Waypoint in points)
  latLngs.push(new LatLng(point.lat,point.lon));

// create a Polyline with the LatLng array
var polyline : Polyline = new Polyline(latLngs);

// add it to your map
map .addOverlay(polyline);
</pre>
<p>The Google Maps API reference is <a href="http://code.google.com/apis/maps/documentation/flash/reference.html" rel="nofollow">here</a>, if you need it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://blog.robskelly.com/2009/01/a-gpx-parser-in-actionscript-3/comment-page-1/#comment-88</link>
		<dc:creator>John</dc:creator>
		<pubDate>Sun, 01 Mar 2009 21:37:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.robskelly.com/?p=38#comment-88</guid>
		<description>Hi Rob,
I am new with AS3.
How can I use your code with Flex3?</description>
		<content:encoded><![CDATA[<p>Hi Rob,<br />
I am new with AS3.<br />
How can I use your code with Flex3?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://blog.robskelly.com/2009/01/a-gpx-parser-in-actionscript-3/comment-page-1/#comment-87</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Tue, 24 Feb 2009 00:09:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.robskelly.com/?p=38#comment-87</guid>
		<description>I just committed it: http://code.google.com/p/dijital-as3-lib/source/checkout

I haven&#039;t really had the time to work on it, so it&#039;s essentially in the same form that it was when I posted this. That is, it might be pretty, um, &lt;em&gt;substandard&lt;/em&gt; in places. If you have trouble with it or have any suggestions or requests for functionality, let me know.

To build a movie like the one above, use the ca.dijital.samples.gpx.GPXTest class as your doc class and add your Google Maps key on line 53. Otherwise, just use ca.dijital.gps.gpx.GPX.

You&#039;d create an object like this:

&lt;pre&gt;
var gpx : GPX = GPX.parse(data);
&lt;/pre&gt;

Where &lt;pre&gt;data&lt;/pre&gt; is either a string representing the file&#039;s contents or an XML object.</description>
		<content:encoded><![CDATA[<p>I just committed it: <a href="http://code.google.com/p/dijital-as3-lib/source/checkout" rel="nofollow">http://code.google.com/p/dijital-as3-lib/source/checkout</a></p>
<p>I haven&#8217;t really had the time to work on it, so it&#8217;s essentially in the same form that it was when I posted this. That is, it might be pretty, um, <em>substandard</em> in places. If you have trouble with it or have any suggestions or requests for functionality, let me know.</p>
<p>To build a movie like the one above, use the ca.dijital.samples.gpx.GPXTest class as your doc class and add your Google Maps key on line 53. Otherwise, just use ca.dijital.gps.gpx.GPX.</p>
<p>You&#8217;d create an object like this:</p>
<pre>
var gpx : GPX = GPX.parse(data);
</pre>
<p>Where
<pre>data</pre>
<p> is either a string representing the file&#8217;s contents or an XML object.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://blog.robskelly.com/2009/01/a-gpx-parser-in-actionscript-3/comment-page-1/#comment-86</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Wed, 18 Feb 2009 18:04:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.robskelly.com/?p=38#comment-86</guid>
		<description>Hi Rob,

I am very interested in your GPX Parser.
When are you posting the code?</description>
		<content:encoded><![CDATA[<p>Hi Rob,</p>
<p>I am very interested in your GPX Parser.<br />
When are you posting the code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://blog.robskelly.com/2009/01/a-gpx-parser-in-actionscript-3/comment-page-1/#comment-85</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Mon, 16 Feb 2009 21:51:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.robskelly.com/?p=38#comment-85</guid>
		<description>Very nice! 
I&#039;m searching for a GPX Parser in ActionScript 3 (Flex3).
Looking forward to download it at code.google

Cheers</description>
		<content:encoded><![CDATA[<p>Very nice!<br />
I&#8217;m searching for a GPX Parser in ActionScript 3 (Flex3).<br />
Looking forward to download it at code.google</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
</channel>
</rss>
