<?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 — markerClick with labels]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1848</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1848&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in markerClick with labels.]]></description>
		<lastBuildDate>Sun, 26 Sep 2021 12:55:10 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: markerClick with labels]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=7771#p7771</link>
			<description><![CDATA[<div class="quotebox"><cite>Alex Vertax wrote:</cite><blockquote><p>Something like that:<br /></p><div class="codebox"><pre><code>// Set label
marker.label = &quot;My Label&quot;;

// Set tag
marker.tags.Add(&quot;My Tag&quot;);

// Set custom data
marker[&quot;anyKey&quot;] = anyValue;

// Get marker by label
marker = OnlineMapsMarkerManager.instance.FirstOrDefault(m =&gt; m.label == &quot;My Label&quot;);

// Get marker by tag
marker = OnlineMapsMarkerManager.instance.FirstOrDefault(m =&gt; m.tags.Contains(&quot;My Tag&quot;));

// Get custom data
anyValue = marker[&quot;anyKey&quot;] as TypeOfValue;</code></pre></div></blockquote></div><p>Thank you! Thats very helpful.</p>]]></description>
			<author><![CDATA[null@example.com (landl0s)]]></author>
			<pubDate>Sun, 26 Sep 2021 12:55:10 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=7771#p7771</guid>
		</item>
		<item>
			<title><![CDATA[Re: markerClick with labels]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=7770#p7770</link>
			<description><![CDATA[<p>Something like that:<br /></p><div class="codebox"><pre><code>// Set label
marker.label = &quot;My Label&quot;;

// Set tag
marker.tags.Add(&quot;My Tag&quot;);

// Set custom data
marker[&quot;anyKey&quot;] = anyValue;

// Get marker by label
marker = OnlineMapsMarkerManager.instance.FirstOrDefault(m =&gt; m.label == &quot;My Label&quot;);

// Get marker by tag
marker = OnlineMapsMarkerManager.instance.FirstOrDefault(m =&gt; m.tags.Contains(&quot;My Tag&quot;));

// Get custom data
anyValue = marker[&quot;anyKey&quot;] as TypeOfValue;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Sun, 26 Sep 2021 12:38:19 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=7770#p7770</guid>
		</item>
		<item>
			<title><![CDATA[Re: markerClick with labels]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=7768#p7768</link>
			<description><![CDATA[<p>I have different 2 D Markers created with the Online Maps Marker Manager and the markers are&nbsp; are organized with label&#039;s. <br />Now i want to instantiate a gameobjects when i click on a marker with a specific label. </p><p>I use the code from MarkerClickExample:</p><p>&nbsp; &nbsp; &nbsp; &nbsp; </p><div class="codebox"><pre><code>  public class MarkerClickExample : MonoBehaviour
    {
        private void Start()
        {
            OnlineMaps map = OnlineMaps.instance;

            // Add OnClick events to static markers
            foreach (OnlineMapsMarker marker in OnlineMapsMarkerManager.instance)
            {
                marker.OnClick += OnMarkerClick;
            }

            // Add OnClick events to dynamic markers
            OnlineMapsMarker dynamicMarker = OnlineMapsMarkerManager.CreateItem(Vector2.zero, null, &quot;dynamicMarker&quot;);
            dynamicMarker.OnClick += OnMarkerClick;
        }


  
        private void OnMarkerClick(OnlineMapsMarkerBase marker)
        {</code></pre></div><p>Problem is i dont know how to label or tag the different markers.<br />I need something like FindGameObjectWithTag(&quot;spown1&quot;) for the marker label if thats possible.</p><p>i hope its more clear now.</p>]]></description>
			<author><![CDATA[null@example.com (landl0s)]]></author>
			<pubDate>Sat, 25 Sep 2021 20:28:55 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=7768#p7768</guid>
		</item>
		<item>
			<title><![CDATA[Re: markerClick with labels]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=7766#p7766</link>
			<description><![CDATA[<p>Hello.</p><p>Unfortunately I didn&#039;t understand your question.<br />Please rephrase this in more detail.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Sat, 25 Sep 2021 12:36:59 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=7766#p7766</guid>
		</item>
		<item>
			<title><![CDATA[markerClick with labels]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=7764#p7764</link>
			<description><![CDATA[<p>hello im using the MarkerClickExample is it possible to call markers with spezific labels for different onclick events?</p>]]></description>
			<author><![CDATA[null@example.com (landl0s)]]></author>
			<pubDate>Sat, 25 Sep 2021 11:44:03 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=7764#p7764</guid>
		</item>
	</channel>
</rss>
