<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Best way to find index of markers?]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1700&amp;type=atom" />
	<updated>2021-02-22T19:38:48Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1700</id>
		<entry>
			<title type="html"><![CDATA[Re: Best way to find index of markers?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7176#p7176" />
			<content type="html"><![CDATA[<p>Thanks, I think I had it in my mind that I should have been able to access the IndexOf&lt;Marker&gt; right from the OnlineMapsMarkerManager class, since that is where the RemoveItem is.</p><p>Anywho, thank you!</p>]]></content>
			<author>
				<name><![CDATA[mcb]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1341</uri>
			</author>
			<updated>2021-02-22T19:38:48Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7176#p7176</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Best way to find index of markers?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7175#p7175" />
			<content type="html"><![CDATA[<p>Hello.</p><p>How to find the index of a marker:<br /></p><div class="codebox"><pre><code>int index = OnlineMapsMarkerManager.instance.items.IndexOf(marker);</code></pre></div><p>How to remove a specific marker:<br />OnlineMapsInteractiveElementManager.RemoveItem<br /><a href="https://infinity-code.com/doxygen/online-maps/classOnlineMapsInteractiveElementManager.html#a6b89066ddb82b573d10b713dc76b6b3b">https://infinity-code.com/doxygen/onlin … 3dc76b6b3b</a><br /></p><div class="codebox"><pre><code>OnlineMapsMarkerManager.RemoveItem(marker);</code></pre></div><p>How to remove all markers except the required one(s):<br />OnlineMapsInteractiveElementManager.RemoveAllItems<br /><a href="https://infinity-code.com/doxygen/online-maps/classOnlineMapsInteractiveElementManager.html#a6bb6d9d675600044ca4c788d6c977d19">https://infinity-code.com/doxygen/onlin … 8d6c977d19</a><br /></p><div class="codebox"><pre><code>OnlineMapsMarkerManager.RemoveAllItems(m =&gt; m != marker);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2021-02-22T19:14:21Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7175#p7175</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Best way to find index of markers?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7174#p7174" />
			<content type="html"><![CDATA[<p>I keep finding myself needing to write a lot of code to simply to remove specific markers from the map. </p><p>My current goto is to simply blow away all of the markers and redraw the ones I still want.</p><p>I&#039;m surprised that there isn&#039;t a `FindIndex` for the OnlineMapsMarkerManager class.</p><p>Maybe I&#039;m missing something, what is the preferred method of removing a specific marker from the map?</p>]]></content>
			<author>
				<name><![CDATA[mcb]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1341</uri>
			</author>
			<updated>2021-02-22T18:52:58Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7174#p7174</id>
		</entry>
</feed>
