<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Find distance , direction b/w two places]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=208&amp;type=atom" />
	<updated>2016-08-10T12:58:48Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=208</id>
		<entry>
			<title type="html"><![CDATA[Re: Find distance , direction b/w two places]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1082#p1082" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Yes, this bug has been fixed in Online Maps v2.4.0.56.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-08-10T12:58:48Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1082#p1082</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Find distance , direction b/w two places]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1080#p1080" />
			<content type="html"><![CDATA[<p>@Alex,<br />Have you fixed it?</p>]]></content>
			<author>
				<name><![CDATA[johnGate]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=221</uri>
			</author>
			<updated>2016-08-10T09:37:23Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1080#p1080</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Find distance , direction b/w two places]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=951#p951" />
			<content type="html"><![CDATA[<p>You have a very difficult route, which has a lot of points, so that the drawing element has more 65,000 vertices.</p><p>We&#039;ll fix it.<br />I think it will take 1-2 days.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-07-26T18:19:54Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=951#p951</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Find distance , direction b/w two places]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=948#p948" />
			<content type="html"><![CDATA[<p>and here is error</p>]]></content>
			<author>
				<name><![CDATA[aammfe]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=200</uri>
			</author>
			<updated>2016-07-26T17:56:39Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=948#p948</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Find distance , direction b/w two places]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=947#p947" />
			<content type="html"><![CDATA[<p>when set two distant points for directions , it start showing errors..</p><p>this is my code <br /> public void findDirection()<br />&nbsp; &nbsp; {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsFindDirection.Find(from.text, to.text, true).OnComplete += onFindLoaction;<br />&nbsp; &nbsp; &nbsp; &nbsp; //OnlineMapsFindDirection.Find();<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;send request&quot;);<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; private void onFindLoaction(string routXml)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;complete&quot;);</p><br /><p>&nbsp; &nbsp; &nbsp; &nbsp; List&lt;OnlineMapsDirectionStep&gt; steps = OnlineMapsDirectionStep.TryParse(routXml);</p><br /><p>&nbsp; &nbsp; &nbsp; &nbsp; if (steps != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach (OnlineMapsDirectionStep step in steps) Debug.Log(step.stringInstructions);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List&lt;Vector2&gt; points = OnlineMapsDirectionStep.GetPoints(steps);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsDrawingLine route = new OnlineMapsDrawingLine(points, Color.green);</p><br /><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMaps.instance.AddDrawingElement(route);</p><br /><br /><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Vector2 center;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int zoom;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsUtils.GetCenterPointAndZoom(points.ToArray(), out center, out zoom);</p><br /><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMaps.instance.zoom = zoom;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMaps.instance.SetPosition(center.x ,center.y);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var distance = OnlineMapsUtils.DistanceBetweenPoints(points[0], points[points.Count -1]);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;Distence&quot; + distance);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;Find direction failed&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }</p>]]></content>
			<author>
				<name><![CDATA[aammfe]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=200</uri>
			</author>
			<updated>2016-07-26T17:54:53Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=947#p947</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Find distance , direction b/w two places]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=946#p946" />
			<content type="html"><![CDATA[<p>Almost:<br /></p><div class="codebox"><pre><code>float DistanceKM = OnlineMapsUtils.DistanceBetweenPoints(point1, point2).magnitude;</code></pre></div><p>Unfortunately, the current version does not have a method that calculates the distance for array of points.<br />You can calculate the distance between each pair of points (1-2, 2-3, 3-4, ...) and sum the results.<br />Or we can add this method.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-07-26T17:28:45Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=946#p946</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Find distance , direction b/w two places]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=945#p945" />
			<content type="html"><![CDATA[<p>correct me if i m wrong .</p><p>this is displacement b/w two points </p><p>float DisplacementKM = OnlineMapsUtils.DistanceBetweenPoints(point1 ,point2);</p><p>....<br />if i m right , then there should be a function to calculate distance amoung points</p>]]></content>
			<author>
				<name><![CDATA[aammfe]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=200</uri>
			</author>
			<updated>2016-07-26T16:57:59Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=945#p945</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Find distance , direction b/w two places]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=940#p940" />
			<content type="html"><![CDATA[<p>Hello.</p><p>OnlineMapsUtils.DistanceBetweenPoints<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsUtils.html#ab8588eb7b2eba619d6c3a0bc84a165f2">http://infinity-code.com/doxygen/online … bc84a165f2</a></p><p>OnlineMapsFindDirection.Find<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsFindDirection.html#af6fbc9ac427f5ca81c948cce4514aa98">http://infinity-code.com/doxygen/online … ce4514aa98</a></p><p>FindDirection Example:<br /><a href="http://infinity-code.com/atlas/online-maps/pages/FindDirectionExample.html">http://infinity-code.com/atlas/online-m … ample.html</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-07-26T13:04:38Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=940#p940</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Find distance , direction b/w two places]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=939#p939" />
			<content type="html"><![CDATA[<p>how to find distance b/w two points .,???<br />just like google maps??? like this image ..?</p>]]></content>
			<author>
				<name><![CDATA[aammfe]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=200</uri>
			</author>
			<updated>2016-07-26T12:59:13Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=939#p939</id>
		</entry>
</feed>
