<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — How can I change marker's layer?]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=288&amp;type=atom" />
	<updated>2016-09-27T08:24:58Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=288</id>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1324#p1324" />
			<content type="html"><![CDATA[<p>I already sent you the unity package. pls help me to solve the problem.</p>]]></content>
			<author>
				<name><![CDATA[tobytaro]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=262</uri>
			</author>
			<updated>2016-09-27T08:24:58Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1324#p1324</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1323#p1323" />
			<content type="html"><![CDATA[<p>Please send something (a scene or video), to I can see the problem.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-09-27T08:16:09Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1323#p1323</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1322#p1322" />
			<content type="html"><![CDATA[<p>Just now I found that if I added radarMarker.Init() after assigning the texture, it would be in the right position, but again, it blocked the tap event of some other markers on it&#039;s upper haft area.</p>]]></content>
			<author>
				<name><![CDATA[tobytaro]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=262</uri>
			</author>
			<updated>2016-09-27T07:13:39Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1322#p1322</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1321#p1321" />
			<content type="html"><![CDATA[<p>It&#039;s just a mystic.<br />I just tested it, and I have all the markers in the right location.<br />Please send us a scene where we can see and test it to support (support@infinity-code.com).<br />We will check and immediately fix the problem.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-09-27T07:09:41Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1321#p1321</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1320#p1320" />
			<content type="html"><![CDATA[<p>Thank you for the code, but it doesn&#039;t work. And after hundreds try, I found some issue about the method &quot;AddMarker&quot;. <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; radarMarker = OnlineMaps.instance.AddMarker(new Vector2(0, 0), &quot;Radar&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; radarMarker.texture = radarMarkerTexture;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; radarMarker.align = OnlineMapsAlign.Center;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; radarMarker.position = playerPosition;&nbsp; //I Worte this code in OnlocationChanged<br />I used these code above to add radarMarker,&nbsp; it fit the event issue, the radarMarker wouldn&#039;t cover(I mean block the tap event) any markers I added later. But the position of the radarmarker is not at the position.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; radarMarker = OnlineMaps.instance.AddMarker(new Vector2(0, 0), RadarMarkerTexture, &quot;Radar&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; radarMarker.align = OnlineMapsAlign.Center;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; radarMarker.position = playerPosition;&nbsp; //I Worte this code in OnlocationChanged<br />I I used these code above to add radarMarker, the position is right. But it&#039;s weird that the upper half of the radarMarker cover(I mean block the tap event) the markers I added later, the lower half of the radarMarker wouldn&#039;t cover(I mean block the tap event) any markers I added later.</p><p>I think maybe there is some bug in the source code. Pls help to fix it. Thank you!</p><p>And I add An image to show you the issue, one player is added by editor, the other player and the green radarMarker are add by code like this <br />playerMarker = OnlineMaps.instance.AddMarker(new Vector2(0, 0), &quot;Player&quot;);<br />playerMarker.texture = playerMarkerTexture;<br />playerMarker.align = OnlineMapsAlign.Center;<br />playerMardker.position = playerPosition;&nbsp; //I Worte this code in OnlocationChanged<br />radarMarker marker&#039;s code is similar as above.<br />In editor they all have same location and align point, and the 2 playerMarker used same playerMarkerTexture. But in the game view, 2 players have different location, and the green radar is not in the center of the playerMarker.</p>]]></content>
			<author>
				<name><![CDATA[tobytaro]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=262</uri>
			</author>
			<updated>2016-09-27T02:25:01Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1320#p1320</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1316#p1316" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>private void MoveMarker(OnlineMapsMarker marker)
    {
        OnlineMapsMarker[] markers = OnlineMaps.instance.markers;
        int offset = 0;
        for (int i = markers.Length - 1; i &gt; 0; i--)
        {
            OnlineMapsMarker m = markers[i];
            if (marker == m) offset++;
            else markers[i + offset] = m;
        }
        markers[0] = marker;
    }</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-26T09:10:06Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1316#p1316</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1315#p1315" />
			<content type="html"><![CDATA[<p>maybe it&#039;s hard to describe, please show me how to do this &quot; remove it from «OnlineMaps.markers» and insert to begin of list.&quot;. I will try to see if it works for me</p>]]></content>
			<author>
				<name><![CDATA[tobytaro]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=262</uri>
			</author>
			<updated>2016-09-26T08:56:17Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1315#p1315</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1314#p1314" />
			<content type="html"><![CDATA[<p>In this case, I do not understand you.<br />I just checked, shows the tooltip of the last the marker (screenshot attached).</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-09-26T08:49:40Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1314#p1314</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1313#p1313" />
			<content type="html"><![CDATA[<p>No, I&#039;m talking about the event order. For instance, I want to tap and show the tooltip. But the radar marker cover some of the markers I add later based on the playerPosition.</p>]]></content>
			<author>
				<name><![CDATA[tobytaro]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=262</uri>
			</author>
			<updated>2016-09-26T08:15:13Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1313#p1313</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1312#p1312" />
			<content type="html"><![CDATA[<p>I think I understand: you&#039;re talking about the order of drawing of markers, instead of the order of events of markers, right?!<br />Use «OnlineMapsTileSetControl.markerComparer», to manually sort the markers.<br />Example:<br /><a href="http://infinity-code.com/atlas/online-maps/pages/TilesetMarkerDepthExample.html">http://infinity-code.com/atlas/online-m … ample.html</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-09-26T08:08:28Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1312#p1312</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1311#p1311" />
			<content type="html"><![CDATA[<p>private void Start () {<br />&nbsp; &nbsp; &nbsp; &nbsp; // Add RadarMarker<br />&nbsp; &nbsp; &nbsp; &nbsp; radarMarker = OnlineMaps.instance.AddMarker(new Vector2(0, 0), radarMarkerTexture, &quot;Radar&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; radarMarker.align = OnlineMapsAlign.Center;<br />}</p><p>private void OnLocationChanged(Vector2 position) {<br />&nbsp; &nbsp; &nbsp; &nbsp; // Get player&#039;s position<br />&nbsp; &nbsp; &nbsp; &nbsp; playerPosition = position;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; //Adjust radarMarker&#039;s position<br />&nbsp; &nbsp; &nbsp; &nbsp; radarMarker.position = playerPosition;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; // Add marker.<br />&nbsp; &nbsp; &nbsp; &nbsp; AddMarkersBasedonPlayerPosition (playerPosition);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; // Redraw map.<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMaps.instance.Redraw();<br />&nbsp; &nbsp; }</p><p>The radar marker cover some markers added later</p>]]></content>
			<author>
				<name><![CDATA[tobytaro]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=262</uri>
			</author>
			<updated>2016-09-26T08:00:06Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1311#p1311</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1310#p1310" />
			<content type="html"><![CDATA[<p>Please show the script where you add a events of markers.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-09-26T07:42:49Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1310#p1310</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1309#p1309" />
			<content type="html"><![CDATA[<p>Please look at the image I upload, Does it mean that the Marker 1 is the first marker I added. It still cover some markers I add later. Is there some bug ?</p>]]></content>
			<author>
				<name><![CDATA[tobytaro]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=262</uri>
			</author>
			<updated>2016-09-26T07:36:51Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1309#p1309</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1308#p1308" />
			<content type="html"><![CDATA[<p>I added the marker first, but still cover the markers added after. So I will try to remove and insert it again, how to insert it to the begin of OnlineMaps.markers?</p>]]></content>
			<author>
				<name><![CDATA[tobytaro]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=262</uri>
			</author>
			<updated>2016-09-26T07:31:52Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1308#p1308</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How can I change marker's layer?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1307#p1307" />
			<content type="html"><![CDATA[<p>For tileset control all 2D markers drawn in «Map GameObject / Markers» in single mesh.<br />You can find this GameObject and change layer. But it will change the layer for all markers.</p><p>When the markers overlap, triggered event of marker that is added last.<br />If you want to the events of some marker do not overlap events of the other markers, add it first, or remove it from «OnlineMaps.markers» and insert to begin of list.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-09-26T06:39:42Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1307#p1307</id>
		</entry>
</feed>
