<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — OnlineMapsUtils.NearestPointStrict, trying to get distance from route]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=864&amp;type=atom" />
	<updated>2018-07-11T13:07:36Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=864</id>
		<entry>
			<title type="html"><![CDATA[Re: OnlineMapsUtils.NearestPointStrict, trying to get distance from route]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3704#p3704" />
			<content type="html"><![CDATA[<p>Thank you for reply, that clears it up! your the man.</p>]]></content>
			<author>
				<name><![CDATA[theboosted1]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=21</uri>
			</author>
			<updated>2018-07-11T13:07:36Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3704#p3704</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OnlineMapsUtils.NearestPointStrict, trying to get distance from route]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3703#p3703" />
			<content type="html"><![CDATA[<p>Hello.</p><p>OnlineMapsUtils.NearestPointStrict method is created for internal use in drawing API, so it is not documented.<br />But in this particular situation this method is very useful.</p><p>How it works:<br />You know that the user should be somewhere between points A and B.<br />You pass to the method the user&#039;s coordinates (U) and the coordinates of points A and B.<br />The method returns the coordinates of the point (C) on the segment AB, which is closest to U.<br />You calculate the distance between points C and U.<br />If the distance is more than 150 feet, you need to find a new route.<br />Example attached.</p><p>Yes, you can assign TextValue&lt;int&gt;.value to an integer variable.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2018-07-10T23:46:43Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3703#p3703</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[OnlineMapsUtils.NearestPointStrict, trying to get distance from route]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3700#p3700" />
			<content type="html"><![CDATA[<p>Hey Alex,<br />I am trying to find the users distance from the route, so if the user gets a certain distance from the route (makes a wrong turn), i can trigger a re-calculation of the route from the users current GPS location. In this post (<a href="http://forum.infinity-code.com/viewtopic.php?id=743">http://forum.infinity-code.com/viewtopic.php?id=743</a>) you mentioned using OnlineMapsUtils.NearestPointStrict, however i could not find it in the API docs. could you explain how to use it? or if there is a better way?</p><p>I am already using distancebetweenpoints to display the next step instruction when the user is within 150 feet of the next point.</p><p>Also, OnlineMapsGoogleDirectionsResult.Step.distance returns a TextValue&lt;int&gt;, Does this mean I can just assign the returned value to an integer variable or is some conversion needed? I looked at the distance and duration example that uses this but i wasn&#039;t sure.</p><p>Thanks for your help!</p>]]></content>
			<author>
				<name><![CDATA[theboosted1]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=21</uri>
			</author>
			<updated>2018-07-10T13:51:26Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3700#p3700</id>
		</entry>
</feed>
