<?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 — Remove custom tooltips]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=379</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=379&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Remove custom tooltips.]]></description>
		<lastBuildDate>Wed, 11 Jan 2017 22:56:34 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Remove custom tooltips]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1671#p1671</link>
			<description><![CDATA[<p>Yes. Actually, I already did it, and in future updates OnRemoveMarker will be invoked.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 11 Jan 2017 22:56:34 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1671#p1671</guid>
		</item>
		<item>
			<title><![CDATA[Re: Remove custom tooltips]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1669#p1669</link>
			<description><![CDATA[<p>Okay then, thanks for the tip!</p><p>On a side note, will &quot;OnRemoveMarker&quot; be invoked when calling &quot;RemoveAllMarkers&quot; in a future update?</p>]]></description>
			<author><![CDATA[null@example.com (vlucki)]]></author>
			<pubDate>Wed, 11 Jan 2017 15:45:15 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1669#p1669</guid>
		</item>
		<item>
			<title><![CDATA[Re: Remove custom tooltips]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1660#p1660</link>
			<description><![CDATA[<p>Hello.</p><p>Just remove the all tooltips before using RemoveAllMarkers.<br />Something like:<br /></p><div class="codebox"><pre><code>foreach (OnlineMapsMarker marker in OnlineMaps.instance.markers) DestroyTooltip(marker);
OnlineMaps.instance.RemoveAllMarkers();</code></pre></div><p>If you remove the markers from another script, simply make a public method that will remove all tooltips.</p><p>Thank you for writing about OnRemoveMarker. We missed this point.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 11 Jan 2017 08:17:29 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1660#p1660</guid>
		</item>
		<item>
			<title><![CDATA[Remove custom tooltips]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1657#p1657</link>
			<description><![CDATA[<p>How to remove custom uGUI tooltips from the map when all markers are removed?</p><p>The example code doesn&#039;t seem to work when I call<br /></p><div class="codebox"><pre><code>OnlineMaps.instance.RemoveAllMarkers();</code></pre></div><p>because &quot;OnRemoveMarker&quot; is not called.</p><p>Also, since the array containing all markers is created anew, the code in LateUpdate doesn&#039;t work either</p><div class="codebox"><pre><code>        //empty, so no tooltip is destroyed
        foreach (OnlineMapsMarker marker in OnlineMaps.instance.markers)
        {
            if (string.IsNullOrEmpty(marker.label))
            {
                DestroyTooltip(marker);
                continue;
            }

            if (!marker.inMapView)
            {
                DestroyTooltip(marker);
                continue;
            }
        }</code></pre></div><p>I figured I could just call &quot;RemoveMarker&quot;, but for a lot of markers, calling Array.Resize every time is out of the question.</p><p>I also thought about just creating an extension method that calls &quot;OnRemoveMarker&quot; for every one</p><p>Bottom line, is there a way to clear all markers from the map and, at the same time, remove all custom tooltips? Is there an event somewhere that is called? Or is this something I have to implement by myself? (which is fine, btw, I am just curious)</p>]]></description>
			<author><![CDATA[null@example.com (vlucki)]]></author>
			<pubDate>Tue, 10 Jan 2017 15:42:02 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1657#p1657</guid>
		</item>
	</channel>
</rss>
