<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — CalcAreaExample.cs]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1362&amp;type=atom" />
	<updated>2019-09-19T20:34:20Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1362</id>
		<entry>
			<title type="html"><![CDATA[Re: CalcAreaExample.cs]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=5588#p5588" />
			<content type="html"><![CDATA[<p>it worked, thank you!</p>]]></content>
			<author>
				<name><![CDATA[mimarilker]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=600</uri>
			</author>
			<updated>2019-09-19T20:34:20Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=5588#p5588</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CalcAreaExample.cs]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=5585#p5585" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2019-09-19T13:03:22Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=5585#p5585</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CalcAreaExample.cs]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=5583#p5583" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[mimarilker]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=600</uri>
			</author>
			<updated>2019-09-18T21:22:47Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=5583#p5583</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CalcAreaExample.cs]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=5579#p5579" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2019-09-17T16:26:21Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=5579#p5579</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[CalcAreaExample.cs]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=5575#p5575" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[mimarilker]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=600</uri>
			</author>
			<updated>2019-09-17T09:24:35Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=5575#p5575</id>
		</entry>
</feed>
