<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Infinity Code Forum — Draw Line from GPX]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=279</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=279&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Draw Line from GPX.]]></description>
		<lastBuildDate>Thu, 22 Sep 2016 08:24:57 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Draw Line from GPX]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1287#p1287</link>
			<description><![CDATA[<p>Wow, excellent thanks :-)</p>]]></description>
			<author><![CDATA[null@example.com (nigel.moore)]]></author>
			<pubDate>Thu, 22 Sep 2016 08:24:57 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1287#p1287</guid>
		</item>
		<item>
			<title><![CDATA[Re: Draw Line from GPX]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1283#p1283</link>
			<description><![CDATA[<p>Hello.</p><p>We have implemented this feature, and the next update (v2.5.0.8 beta, will be available this week through the built-in update system) will contain it.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 21 Sep 2016 19:17:50 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1283#p1283</guid>
		</item>
		<item>
			<title><![CDATA[Re: Draw Line from GPX]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1278#p1278</link>
			<description><![CDATA[<p>Thanks for the reply. It would be really really great if this functionality could be implemented <img src="https://forum.infinity-code.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (nigel.moore)]]></author>
			<pubDate>Wed, 21 Sep 2016 08:29:38 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1278#p1278</guid>
		</item>
		<item>
			<title><![CDATA[Re: Draw Line from GPX]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1262#p1262</link>
			<description><![CDATA[<p>Hello.</p><p>In the current version - no, the line has not HitTest method, and all events and tooltips will be ignored.<br />If you really need events for the line, we can try to implement it.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 15 Sep 2016 12:48:36 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1262#p1262</guid>
		</item>
		<item>
			<title><![CDATA[Re: Draw Line from GPX]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1261#p1261</link>
			<description><![CDATA[<p>Thanks Alex, sorted it now :-)</p><p>I am trying to capture user interaction (clicks initially) along the line that&#039;s being drawn and get some information back such as name of line and location along the path - is this possible? Also I can&#039;t seem to implement a tooltip for a line either, is this also possible?</p><p>Thanks</p>]]></description>
			<author><![CDATA[null@example.com (nigel.moore)]]></author>
			<pubDate>Thu, 15 Sep 2016 12:38:53 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1261#p1261</guid>
		</item>
		<item>
			<title><![CDATA[Re: Draw Line from GPX]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1254#p1254</link>
			<description><![CDATA[<p>Hello.</p><p>segment.points - is List &lt;OnlineMapsGPXObject.Waypoint&gt;.<br />OnlineMapsDrawingLine uses IEnumerable, where elements is Vector2, float or double.</p><p>The correct way:<br /></p><div class="codebox"><pre><code>OnlineMaps.instance.AddDrawingElement(new OnlineMapsDrawingLine(segment.points.Select(p =&gt; new Vector2((float)p.lon, (float)p.lat)), Color.red));</code></pre></div><p>or<br /></p><div class="codebox"><pre><code>OnlineMaps.instance.AddDrawingElement(new OnlineMapsDrawingLine(segment.points.SelectMany(p =&gt; new [] {p.lon, p.lat}), Color.red));</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 14 Sep 2016 12:36:08 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1254#p1254</guid>
		</item>
		<item>
			<title><![CDATA[Re: Draw Line from GPX]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1253#p1253</link>
			<description><![CDATA[<p>Ok, so found out what was going on so thought I&#039;d post here in case its of use to anyone else -- The points in the GPX file are stored as {lat,long} but the list of Vectors required for OnlineMapsDrawingLine need to be {long,lat} ;-)</p>]]></description>
			<author><![CDATA[null@example.com (nigel.moore)]]></author>
			<pubDate>Wed, 14 Sep 2016 11:40:12 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1253#p1253</guid>
		</item>
		<item>
			<title><![CDATA[Draw Line from GPX]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1252#p1252</link>
			<description><![CDATA[<p>Hi Alex,</p><p>Am having trouble drawing a line on a tileset map from points in a GPX file. File is parsed fine, I pass the </p><div class="codebox"><pre><code>OnlineMapsGPXObject.TrackSegment.points</code></pre></div><p> into </p><div class="codebox"><pre><code>OnlineMapsDrawingLine</code></pre></div><p> and I even get a </p><div class="codebox"><pre><code>true</code></pre></div><p> returned for </p><div class="codebox"><pre><code>path.visible</code></pre></div><p> but there remains no line drawn across the tileset? Here&#039;s the code I&#039;m using ...</p><div class="codebox"><pre><code>if(File.Exists(pathToGPX))
        {
            // Load data from file into string
            string data = File.ReadAllText(pathToGPX, Encoding.UTF8);

            // Attempt to load data as GPX object
            gpx = OnlineMapsGPXObject.Load(data);

            foreach(OnlineMapsGPXObject.Track route in gpx.tracks)
            {
                Debug.LogFormat(&quot;Bike Track - {0}&quot;,route.name);
                foreach(OnlineMapsGPXObject.TrackSegment segment in route.segments)
                {
                    Debug.LogFormat(&quot;Route {0}, points {1}&quot;,route.name,segment.points.ToString());

                    for(int i=0; i&lt;segment.points.Count;i++) Debug.LogFormat(&quot;Waypoint - {0},{1}&quot;,segment.points[i].lat, segment.points[i].lon);

                    OnlineMapsDrawingLine path = new OnlineMapsDrawingLine(segment.points, Color.red);

                    api.AddDrawingElement(path);
//                    api.Redraw();

                    Debug.Log(&quot;path is visible?? &quot;+path.visible);
                }</code></pre></div><p>Am I missing something really obvious / stupid??&nbsp; Help please ;-)</p>]]></description>
			<author><![CDATA[null@example.com (nigel.moore)]]></author>
			<pubDate>Wed, 14 Sep 2016 11:22:20 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1252#p1252</guid>
		</item>
	</channel>
</rss>
