<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — A Picture is worth...]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=102&amp;type=atom" />
	<updated>2016-03-09T17:17:32Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=102</id>
		<entry>
			<title type="html"><![CDATA[Re: A Picture is worth...]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=436#p436" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Alex Vertax wrote:</cite><blockquote><p>Hello.</p><p>Yes you are right. The problem was in this line.<br />Fixed a bug in the example (attached).</p></blockquote></div><p>Perfect, works like a charm. Thanks again!</p>]]></content>
			<author>
				<name><![CDATA[stephen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=99</uri>
			</author>
			<updated>2016-03-09T17:17:32Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=436#p436</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: A Picture is worth...]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=433#p433" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Yes you are right. The problem was in this line.<br />Fixed a bug in the example (attached).</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-03-06T22:20:33Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=433#p433</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: A Picture is worth...]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=432#p432" />
			<content type="html"><![CDATA[<p>I am having one issue however with the NGUI marker system example:</p><p>At zoom level 3, if I scroll the map horizontally to the left, when my markers approach the right side of the screen window my markers all teleport out into the middle of the ocean (see image attached).</p><p>I&#039;m pretty sure it has to do with the&nbsp; &quot;p.x += 360;&quot; code in the example below, but I&#039;m not sure what this was intended to do, so I&#039;m not sure how to fix it. Any thoughts?</p><div class="codebox"><pre><code>        private void OnMapUpdated()
        {
            Vector2 tl = OnlineMaps.instance.topLeftPosition;
            Vector2 br = OnlineMaps.instance.bottomRightPosition;

            Rect rect = new Rect(tl.x, br.y, br.x - tl.x, tl.y - br.y);
            if (rect.width &lt; 0) rect.width += 360;
            // eventually need to iterate over all marker lists
            foreach (CityMarker marker in cityMarkers)
            {
                Vector2 p = marker.position;
                GameObject go = marker.gameObject;

                if (!rect.Contains(p))
                {
                    p.x += 360;

                    if (!rect.Contains(p))
                    {
                        if (go.activeSelf) go.SetActive(false);
                        continue;
                    }
                }

                if (!go.activeSelf) go.SetActive(true);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[stephen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=99</uri>
			</author>
			<updated>2016-03-06T04:36:36Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=432#p432</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[A Picture is worth...]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=431#p431" />
			<content type="html"><![CDATA[<p>a thousand lines of code, and a whole lot of thanks!</p><p>I figure you guys don&#039;t get to see too much in the way of what your users do with your hard work, so I wanted to post this as a way to say thanks for the asset, and especially thanks for the support here in the forums.</p><p>These are player generated city icons as NGUI layered sprite markers overlaying a google map that had their positions validated as valid by the &quot;detect water by texture&quot; example.</p><p>Not counting &quot;I don&#039;t know what the hell I&#039;m doing!&quot; time, the map portions took about 6 hours total. When I did this in a browser via javascript, it took me at least 3 days worth of coding to get something not nearly as nice.</p>]]></content>
			<author>
				<name><![CDATA[stephen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=99</uri>
			</author>
			<updated>2016-03-05T20:06:22Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=431#p431</id>
		</entry>
</feed>
