<?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 — How to modify a certain group 2D of markers?]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=670</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=670&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to modify a certain group 2D of markers?.]]></description>
		<lastBuildDate>Thu, 05 Oct 2017 18:20:45 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to modify a certain group 2D of markers?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=2894#p2894</link>
			<description><![CDATA[<p>The first example for markers with a tag.<br />The second example for markers with information in customData.</p><p>1. Example:<br /></p><div class="codebox"><pre><code>OnlineMapsMarker marker = OnlineMaps.instance.AddMarker(lng, lat);
marker.tags.Add(&quot;mytag&quot;);</code></pre></div><p>2. OnlineMapsMarkerBase.enabled.<br />Example:<br /></p><div class="codebox"><pre><code>OnlineMapsMarker marker = OnlineMaps.instance.AddMarker(lng, lat);
marker.enabled = false;</code></pre></div><p>3. If you want to remove the markers that have the specified tag, use OnlineMaps.RemoveMarkersByTag.<br />You have direct access to the array of markers, so you can implement the rule of removing markers of any complexity.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 05 Oct 2017 18:20:45 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=2894#p2894</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to modify a certain group 2D of markers?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=2893#p2893</link>
			<description><![CDATA[<p>Thank you, Alex Vertax, for very interesting examples...<br />Talking about the LINQ example - this way we can iterate through the array of markers and &quot;do something&quot; with markers with a specific tag, right?</p><p>1) How can I assign a tag to a marker (probably we should somehow do it during its creation via OnlineMaps.AddMarker)?<br />2) Is there a way to &quot;disable&quot; and &quot;enable&quot; 2D markers? Or we should remove/create them instead?<br />3)How can I pass the markers (which I can select using the LINQ example) to the OnlineMaps.RemoveMarker() function in order to remove them?</p><p>Thank you!</p>]]></description>
			<author><![CDATA[null@example.com (Rumata)]]></author>
			<pubDate>Thu, 05 Oct 2017 18:03:37 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=2893#p2893</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to modify a certain group 2D of markers?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=2882#p2882</link>
			<description><![CDATA[<p>Hello.</p><p>You can use OnlineMapsMarkerBase.tags or OnlineMapsMarkerBase.customData to store the group ID (or other information that you need to define a marker group).<br />You have direct access to the array of markers, so you can easily make a selection, for example (LINQ):<br /></p><div class="codebox"><pre><code>foreach (OnlineMapsMarker marker in OnlineMaps.instance.markers.Where(m =&gt; m.tags.Contains(&quot;mytag&quot;)))
{
    // do something
}</code></pre></div><p>or<br /></p><div class="codebox"><pre><code>string groupID = &quot;mygroup&quot;;
var markers = OnlineMaps.instance.markers.Where(delegate(OnlineMapsMarker marker)
{
    // It does not matter what CData class is here. 
    // You can store any object in customData.
    CData data = marker.customData as CData;
    return data != null &amp;&amp; data.group == groupID;
});
foreach (OnlineMapsMarker marker in markers)
{
    // do something
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 02 Oct 2017 23:28:18 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=2882#p2882</guid>
		</item>
		<item>
			<title><![CDATA[How to modify a certain group 2D of markers?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=2879#p2879</link>
			<description><![CDATA[<p>Hello,</p><p>Is there a way to display/hide/modify(change color) of a certain group of 2D markers and not all of them?</p><p>Is it possible to do this with 2D markers created through the inspector, or in this case markers should be created through the code?</p><p>I think as an option I could create the markers via the script and add a specific tag to them in order to manipulate them later. <br />Is there another way designed for Online Maps?</p><p>Thank you!</p>]]></description>
			<author><![CDATA[null@example.com (Rumata)]]></author>
			<pubDate>Mon, 02 Oct 2017 21:26:53 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=2879#p2879</guid>
		</item>
	</channel>
</rss>
