<?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 — How to get coordinates of 4 corners on mobile screen]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=486</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=486&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to get coordinates of 4 corners on mobile screen.]]></description>
		<lastBuildDate>Tue, 04 Apr 2017 03:33:04 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to get coordinates of 4 corners on mobile screen]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=2148#p2148</link>
			<description><![CDATA[<div class="quotebox"><cite>Alex Vertax wrote:</cite><blockquote><p>Hello.</p><p>Yes, you need to use OnlineMapsControlBase.GetCoords. <br />Example:<br /></p><div class="codebox"><pre><code>using UnityEngine;

public class GetCoordinatesOfScreenCorners:MonoBehaviour
{
    public static void LogCorners()
    {
        double lng, lat;

        OnlineMapsControlBase.instance.GetCoords(out lng, out lat, new Vector2(0, 0));
        Debug.Log(&quot;Bottom left longitude: &quot; + lng + &quot;, latitude: &quot; + lat);

        OnlineMapsControlBase.instance.GetCoords(out lng, out lat, new Vector2(Screen.width, 0));
        Debug.Log(&quot;Bottom right longitude: &quot; + lng + &quot;, latitude: &quot; + lat);

        OnlineMapsControlBase.instance.GetCoords(out lng, out lat, new Vector2(Screen.width, Screen.height));
        Debug.Log(&quot;Top right longitude: &quot; + lng + &quot;, latitude: &quot; + lat);

        OnlineMapsControlBase.instance.GetCoords(out lng, out lat, new Vector2(0, Screen.height));
        Debug.Log(&quot;Top left longitude: &quot; + lng + &quot;, latitude: &quot; + lat);
    }

    private void OnGUI()
    {
        if (GUILayout.Button(&quot;Log corners&quot;)) LogCorners();
    }
}</code></pre></div></blockquote></div><p>thanks!</p>]]></description>
			<author><![CDATA[null@example.com (anhdung.bka317)]]></author>
			<pubDate>Tue, 04 Apr 2017 03:33:04 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=2148#p2148</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to get coordinates of 4 corners on mobile screen]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=2140#p2140</link>
			<description><![CDATA[<p>Hello.</p><p>Yes, you need to use OnlineMapsControlBase.GetCoords. <br />Example:<br /></p><div class="codebox"><pre><code>using UnityEngine;

public class GetCoordinatesOfScreenCorners:MonoBehaviour
{
    public static void LogCorners()
    {
        double lng, lat;

        OnlineMapsControlBase.instance.GetCoords(out lng, out lat, new Vector2(0, 0));
        Debug.Log(&quot;Bottom left longitude: &quot; + lng + &quot;, latitude: &quot; + lat);

        OnlineMapsControlBase.instance.GetCoords(out lng, out lat, new Vector2(Screen.width, 0));
        Debug.Log(&quot;Bottom right longitude: &quot; + lng + &quot;, latitude: &quot; + lat);

        OnlineMapsControlBase.instance.GetCoords(out lng, out lat, new Vector2(Screen.width, Screen.height));
        Debug.Log(&quot;Top right longitude: &quot; + lng + &quot;, latitude: &quot; + lat);

        OnlineMapsControlBase.instance.GetCoords(out lng, out lat, new Vector2(0, Screen.height));
        Debug.Log(&quot;Top left longitude: &quot; + lng + &quot;, latitude: &quot; + lat);
    }

    private void OnGUI()
    {
        if (GUILayout.Button(&quot;Log corners&quot;)) LogCorners();
    }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 03 Apr 2017 20:05:16 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=2140#p2140</guid>
		</item>
		<item>
			<title><![CDATA[How to get coordinates of 4 corners on mobile screen]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=2130#p2130</link>
			<description><![CDATA[<p>Hi <br />I&#039;m trying to get coordinates of 4 corners on screen of mobile to get all markers among that 4 corners. And their coordinate must be updated when I zoom in/out.<br />But I don&#039;t know how to do this. I used OnlineMapsControlBase.GetCoords, but it is not working.<br />Is there any way to do this?<br />Thanks!</p>]]></description>
			<author><![CDATA[null@example.com (anhdung.bka317)]]></author>
			<pubDate>Mon, 03 Apr 2017 04:15:27 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=2130#p2130</guid>
		</item>
	</channel>
</rss>
