<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Search a route between two locations does not return routes]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2258&amp;type=atom" />
	<updated>2024-04-04T10:57:29Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=2258</id>
		<entry>
			<title type="html"><![CDATA[Re: Search a route between two locations does not return routes]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9484#p9484" />
			<content type="html"><![CDATA[<p>Oh thanks for the help<br />After changing values I was able to see routes and line</p>]]></content>
			<author>
				<name><![CDATA[kiran.jodhani]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=3086</uri>
			</author>
			<updated>2024-04-04T10:57:29Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9484#p9484</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Search a route between two locations does not return routes]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9483#p9483" />
			<content type="html"><![CDATA[<p>Please make sure the values are in order.<br />In Online Maps API, longitude always comes first, then latitude.<br />If you use Vector2, X is longitude, Y is latitude.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2024-04-04T10:51:23Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9483#p9483</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Search a route between two locations does not return routes]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9482#p9482" />
			<content type="html"><![CDATA[<p>public void FindDirection()<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; //OnlineMapsGoogleDirections request = new OnlineMapsGoogleDirections<br />&nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; &nbsp;(<br />&nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; &nbsp; &nbsp;googleAPIKey,<br />&nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; &nbsp; &nbsp;&quot;Los Angeles&quot;, // FROM (string or Vector2)<br />&nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; &nbsp; &nbsp;new Vector2(-118.178960f, 35.063995f) // TO (string or Vector2)<br />&nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; &nbsp;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsGoogleDirections request = new OnlineMapsGoogleDirections(googleAPIKey, origin, destination);<br />&nbsp; &nbsp; &nbsp; &nbsp; request.OnComplete += OnFindDirectionComplete;<br />&nbsp; &nbsp; &nbsp; &nbsp; request.Send();<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; private void OnFindDirectionComplete(string response)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsGoogleDirectionsResult result = OnlineMapsGoogleDirections.GetResult(response);<br />&nbsp; &nbsp; &nbsp; &nbsp; if (result == null || result.routes.Length == 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;Find direction failed&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(response);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; foreach (OnlineMapsGoogleDirectionsResult.Leg leg in result.routes[0].legs)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach (OnlineMapsGoogleDirectionsResult.Step step in leg.steps)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(step.string_instructions);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsDrawingLine route = new OnlineMapsDrawingLine(result.routes[0].overview_polylineD, Color.green);<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMaps.drawingElementManager.Add(route);<br />&nbsp; &nbsp; }</p><p>Coordinates <br />Origin - 51.3260028,-0.7753541<br />Destination - 51.3363296,-0.775708</p>]]></content>
			<author>
				<name><![CDATA[kiran.jodhani]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=3086</uri>
			</author>
			<updated>2024-04-04T10:41:47Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9482#p9482</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Search a route between two locations does not return routes]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9481#p9481" />
			<content type="html"><![CDATA[<p>Hi.</p><p>Please show your code (without keys) and the coordinates you are using.<br />I will check it.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2024-04-04T10:33:29Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9481#p9481</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Search a route between two locations does not return routes]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9480#p9480" />
			<content type="html"><![CDATA[<p>Hi <br />I am trying to create direction using to two GPS locations. I referred this FindDirectionExample example</p><p>However when I change GPS points it returns no routes.&nbsp; I confirmed that API is working and both locations are reachable. When I use the same API and tested in https request in browser it shows steps and routes.</p><br /><p>Please help. Thank you</p>]]></content>
			<author>
				<name><![CDATA[kiran.jodhani]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=3086</uri>
			</author>
			<updated>2024-04-04T10:27:30Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9480#p9480</id>
		</entry>
</feed>
