<?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 — Google Maps Distance Matrix API]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=737</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=737&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Google Maps Distance Matrix API.]]></description>
		<lastBuildDate>Fri, 05 Jan 2018 08:29:23 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Google Maps Distance Matrix API]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3198#p3198</link>
			<description><![CDATA[<p>Thank YOU!</p>]]></description>
			<author><![CDATA[null@example.com (choikeelo)]]></author>
			<pubDate>Fri, 05 Jan 2018 08:29:23 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3198#p3198</guid>
		</item>
		<item>
			<title><![CDATA[Re: Google Maps Distance Matrix API]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3194#p3194</link>
			<description><![CDATA[<p>Example:<br /></p><div class="codebox"><pre><code>using System.Linq;
using UnityEngine;

public class DistanceAndDuration:MonoBehaviour
{
    private void Start()
    {
        OnlineMapsGoogleDirections.Find(&quot;Los Angeles&quot;, new Vector2(-118.178960f, 35.063995f)).OnComplete += OnGoogleDirectionsComplete;
    }

    private void OnGoogleDirectionsComplete(string response)
    {
        Debug.Log(response);

        OnlineMapsGoogleDirectionsResult result = OnlineMapsGoogleDirections.GetResult(response);
        if (result == null || result.routes.Length == 0) return;

        OnlineMapsGoogleDirectionsResult.Route route = result.routes[0];

        OnlineMaps.instance.AddDrawingElement(new OnlineMapsDrawingLine(route.overview_polyline, Color.red, 3));

        int distance = route.legs.Sum(l =&gt; l.distance.value);
        int duration = route.legs.Sum(l =&gt; l.duration.value);
        Debug.Log(&quot;Distance: &quot; + distance + &quot; meters, or &quot; + (distance / 1000f).ToString(&quot;F2&quot;) + &quot; km&quot;);
        Debug.Log(&quot;Duration: &quot; + duration + &quot; sec, or &quot; + (duration / 60f).ToString(&quot;F1&quot;) + &quot; min, or &quot; + (duration / 3600f).ToString(&quot;F1&quot;) + &quot; hours&quot;);
    }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 04 Jan 2018 12:50:39 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3194#p3194</guid>
		</item>
		<item>
			<title><![CDATA[Re: Google Maps Distance Matrix API]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3192#p3192</link>
			<description><![CDATA[<p>Hello! Could you explain me how to get estimated time of arrival and distance? please give me example of code<br />Thx</p>]]></description>
			<author><![CDATA[null@example.com (choikeelo)]]></author>
			<pubDate>Thu, 04 Jan 2018 03:54:53 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3192#p3192</guid>
		</item>
		<item>
			<title><![CDATA[Re: Google Maps Distance Matrix API]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3188#p3188</link>
			<description><![CDATA[<p>Hello.</p><p>We did not plan to add support for this API, because it can be implemented using Google Directions API.<br />If you really need this API, we can add classes to work with it.<br />But I do not see any advantages over Directions API.</p><p>Yes I speak Russian.<br />If you want, you can write in support in Russian (support@infinity-code.com).<br />For forum posts, please use English.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 03 Jan 2018 15:19:44 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3188#p3188</guid>
		</item>
		<item>
			<title><![CDATA[Google Maps Distance Matrix API]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=3186#p3186</link>
			<description><![CDATA[<p>Hello! Do you plan to enter this feature? If yes, when?<br />I need ETA<br /><a href="https://developers.google.com/maps/documentation/distance-matrix/start?hl=ru">https://developers.google.com/maps/docu … tart?hl=ru</a></p><p>Offtop: do you speak rus?</p>]]></description>
			<author><![CDATA[null@example.com (choikeelo)]]></author>
			<pubDate>Wed, 03 Jan 2018 11:35:09 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=3186#p3186</guid>
		</item>
	</channel>
</rss>
