<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — How to tell if a latitude-longitude coordinate is on the map view?]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1002&amp;type=atom" />
	<updated>2018-12-27T23:39:54Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1002</id>
		<entry>
			<title type="html"><![CDATA[Re: How to tell if a latitude-longitude coordinate is on the map view?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4448#p4448" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Example:<br /></p><div class="codebox"><pre><code>public static bool InMapView(double longitude, double latitude)
{
    double tlx, tly, brx, bry;
    OnlineMaps.instance.GetCorners(out tlx, out tly, out brx, out bry);

    if (latitude &gt; tly || latitude &lt; bry) return false;

    if (tlx &gt; brx)
    {
        if (longitude &lt; tlx) tlx -= 360;
        else brx += 360;
    }

    return longitude &gt;= tlx &amp;&amp; longitude &lt;= brx;
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2018-12-27T23:39:54Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4448#p4448</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to tell if a latitude-longitude coordinate is on the map view?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4444#p4444" />
			<content type="html"><![CDATA[<p>Is there a way to determine if a lat/long coordinate is on the currently visible map view?</p><p>If so what is it? If not, how can one do that?</p><p>Thanks.</p>]]></content>
			<author>
				<name><![CDATA[Lurch]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=844</uri>
			</author>
			<updated>2018-12-27T16:38:02Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4444#p4444</id>
		</entry>
</feed>
