<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — How to get the instance of the marker from location service]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=277&amp;type=atom" />
	<updated>2016-09-13T13:10:57Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=277</id>
		<entry>
			<title type="html"><![CDATA[Re: How to get the instance of the marker from location service]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1250#p1250" />
			<content type="html"><![CDATA[<p>Thank you very much Alex.<br />Awesome support here!</p>]]></content>
			<author>
				<name><![CDATA[mschakulat]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=224</uri>
			</author>
			<updated>2016-09-13T13:10:57Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1250#p1250</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to get the instance of the marker from location service]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1249#p1249" />
			<content type="html"><![CDATA[<p>Something like:<br /></p><div class="codebox"><pre><code>OnlineMapsMarker3D marker3D = OnlineMapsLocationService.marker as OnlineMapsMarker3D;
MyScript script = marker3D.instance.GetComponent&lt;MyScript&gt;();</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-09-13T13:09:39Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1249#p1249</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to get the instance of the marker from location service]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1248#p1248" />
			<content type="html"><![CDATA[<p>Thank you, Alex. OnlineMapsLocationService.marker works and I get the OnlineMapsMarkerBase object. But I don&#039;t know how to access Components I added to the marker, like animations, as I will get no GameObject but a OnlineMapsMarkerBase object. Can you also help me with that problem?</p>]]></content>
			<author>
				<name><![CDATA[mschakulat]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=224</uri>
			</author>
			<updated>2016-09-13T06:35:13Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1248#p1248</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to get the instance of the marker from location service]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1245#p1245" />
			<content type="html"><![CDATA[<p>Hello.</p><p>OnlineMapsLocationService.marker<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsLocationService.html#ad752ddff23c8c77bff8a2d2f91a82a92">http://infinity-code.com/doxygen/online … 2f91a82a92</a></p><p>Yes, use OnLocationInited.</p><p>The marker is inactive when it is outside the map.<br />Check the location that you specified in the emulator. X - longitude, Y - latitude.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-09-12T17:41:14Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1245#p1245</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to get the instance of the marker from location service]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1243#p1243" />
			<content type="html"><![CDATA[<p>Hi..<br />How can i get the instance of the current marker fro the location service? I added my 3D Prefab und it is shown on the map. I tried to get the current instance by &quot;OnlineMapsLocationService.marker3DPrefab&quot; but that seems only to be the prefab itself and not the current instance. The only way for me to get the instance until now was to use the Find method of the GameObject:</p><p>GameObject.Find (&quot;MyMarker(Clone)&quot;);</p><p>Is there a better way to do that? And where is the best (earliest) place to get the instance (maybe &quot;OnLocationInited&quot;)?</p><p>Besides that, if i get the instance as shown above i have a strange behavior i don&#039;t understand.<br />Sometimes when get the marker like above, the marker gets inactive. I tried it several times. It is only this one line of code which causes this.</p><p>Maybe you can give me a hint how to access the marker and maybe you have an idea why it becomes inactive sometimes.</p>]]></content>
			<author>
				<name><![CDATA[mschakulat]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=224</uri>
			</author>
			<updated>2016-09-12T15:33:35Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1243#p1243</id>
		</entry>
</feed>
