<?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 — CalcAreaExample.cs]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1362</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1362&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in CalcAreaExample.cs.]]></description>
		<lastBuildDate>Thu, 19 Sep 2019 20:34:20 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: CalcAreaExample.cs]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5588#p5588</link>
			<description><![CDATA[<p>it worked, thank you!</p>]]></description>
			<author><![CDATA[null@example.com (mimarilker)]]></author>
			<pubDate>Thu, 19 Sep 2019 20:34:20 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5588#p5588</guid>
		</item>
		<item>
			<title><![CDATA[Re: CalcAreaExample.cs]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5585#p5585</link>
			<description><![CDATA[<div class="codebox"><pre><code>public void Clear()
{
    if (polygon != null)
    {
        OnlineMapsDrawingElementManager.RemoveItem(polygon);
        polygon = null;
    }

    foreach (OnlineMapsMarker marker in markers) OnlineMapsMarkerManager.RemoveItem(marker);
    markers.Clear();

    markerPositions.Clear();
    changed = true;
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 19 Sep 2019 13:03:22 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5585#p5585</guid>
		</item>
		<item>
			<title><![CDATA[Re: CalcAreaExample.cs]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5583#p5583</link>
			<description><![CDATA[<p>Hi,</p><p>RemoveAllItems just hides the polygon, when you try to create a new polygon, the ex one starts to be visible and the new lines connect to it. I just created a numerator to see if there is a need for a time span between removing items and setting polygon null, but not worked.</p><p>&nbsp; IEnumerator WaitForClear()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsDrawingElementManager.RemoveAllItems();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yield return new WaitForSeconds(0.2f);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; polygon = null;<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><br /><p>&nbsp; &nbsp; &nbsp; &nbsp; public void Clear()<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; StartCoroutine(WaitForClear());<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; }</p>]]></description>
			<author><![CDATA[null@example.com (mimarilker)]]></author>
			<pubDate>Wed, 18 Sep 2019 21:22:47 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5583#p5583</guid>
		</item>
		<item>
			<title><![CDATA[Re: CalcAreaExample.cs]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5579#p5579</link>
			<description><![CDATA[<p>Hello.</p><p>You also need to reset the polygon field reference.<br /></p><div class="codebox"><pre><code>polygon = null;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Tue, 17 Sep 2019 16:26:21 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5579#p5579</guid>
		</item>
		<item>
			<title><![CDATA[CalcAreaExample.cs]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5575#p5575</link>
			<description><![CDATA[<p>Hi,</p><p>How to refresh all drawn polygons in CalcAreaExample.cs? I have tried to removeAllItems, it worked but, I cannot draw new ones in the same session at runtime. Could you please help me?</p>]]></description>
			<author><![CDATA[null@example.com (mimarilker)]]></author>
			<pubDate>Tue, 17 Sep 2019 09:24:35 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5575#p5575</guid>
		</item>
	</channel>
</rss>
