<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Click Event for 3DMarker]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=280&amp;type=atom" />
	<updated>2016-09-15T12:37:46Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=280</id>
		<entry>
			<title type="html"><![CDATA[Re: Click Event for 3DMarker]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1260#p1260" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Please make sure that «3D Control Inspector / 3D Markers / Allow Default Marker Events - ON».</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-09-15T12:37:46Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1260#p1260</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Click Event for 3DMarker]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1259#p1259" />
			<content type="html"><![CDATA[<p>Hi..<br />I added some 3DMarkers to the map but the OnClick events seem not to be fired.</p><div class="codebox"><pre><code>// response comes from the OnlineMapsOSMAPIQuery
private OnComplete(string response)
{
        // Some stuff which gets a node from OSM

        OnlineMapsMarker3D marker3D;
        OnlineMapsControlBase3D control = GetComponent&lt;OnlineMapsControlBase3D&gt; ();
        marker3D = control.AddMarker3D (new Vector2 (node.lon, node.lat), markerPrefab);
        marker3D.label = node.id;
        marker3D.OnClick += OnMarkerClick;

        Debug.Log (&quot;DEBUG: &quot; + String.Format (&quot;Long: {0}, Lat: {1}&quot;, node.lon, node.lat));

        markers.Add (marker3D);
    }
}

private void OnMarkerClick (OnlineMapsMarkerBase marker)
{
    Debug.Log (&quot;DEBUG: &quot; + marker.label);
}</code></pre></div><p>If I click on a marker in the editor or on my smartphone, nothing will be logged to the console.</p><p>Best, Michael</p>]]></content>
			<author>
				<name><![CDATA[mschakulat]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=224</uri>
			</author>
			<updated>2016-09-15T11:31:25Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1259#p1259</id>
		</entry>
</feed>
