<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Marker Position]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2310&amp;type=atom" />
	<updated>2024-09-23T22:40:48Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=2310</id>
		<entry>
			<title type="html"><![CDATA[Re: Marker Position]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9653#p9653" />
			<content type="html"><![CDATA[<p>Unfortunately, there is no setting for this.<br />But I can give an example of how to do it, which I made a long time ago for another user:<br /></p><div class="codebox"><pre><code>using UnityEngine;

public class MarkerAtBottom : MonoBehaviour
{
    public float distance = 1;
    private OnlineMapsMarker marker;

    private void Start()
    {
        OnlineMapsCameraOrbit.instance.OnCameraControl += OnCameraControl;

        marker = OnlineMapsMarkerManager.CreateItem(OnlineMaps.instance.position);
        marker.OnPositionChanged += m =&gt; OnCameraControl();
    }

    private void OnCameraControl()
    {
        float angle = (270 + OnlineMapsCameraOrbit.instance.rotation.y) * Mathf.Deg2Rad;

        double tx, ty;
        marker.GetTilePosition(out tx, out ty);
        OnlineMaps.instance.SetTilePosition(tx + Mathf.Cos(angle) * distance, ty + Mathf.Sin(angle) * distance);
    }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2024-09-23T22:40:48Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9653#p9653</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Marker Position]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9649#p9649" />
			<content type="html"><![CDATA[<p>Sorry for the confusion. I use a standard map on an android phone. With the standard 2D marker at the current position. All using the setup from your manual. The map is set to rotate with the compass. What I see is the marker in the middle of the texture and if I point the phone in a given direction I see on the map what is arround me with the top of the texture showing what is in front of me. What I want is the marker at the bottom of the texture as I am online interested in what is in front of me. I can do this in a script, but I was wondering if I missed a standard setting.</p>]]></content>
			<author>
				<name><![CDATA[jaapvandriel]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1852</uri>
			</author>
			<updated>2024-09-22T19:47:49Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9649#p9649</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Marker Position]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9645#p9645" />
			<content type="html"><![CDATA[<p>Hi.</p><p>Unfortunately, I didn&#039;t understand your description of the problem and your questions.</p><p>First of all, which markers are you talking about (2D or 3D)?<br />Next, the behavior you describe is not a standard behavior when creating markers, and is most likely implemented by your scripts, right?</p><p>Please rephrase your problem description and questions in more detail.<br />If any of your scripts are related to this, please show them.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2024-09-14T21:05:58Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9645#p9645</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Marker Position]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9644#p9644" />
			<content type="html"><![CDATA[<p>If I create a marker then the marker is put at the current position and the map is shown with this position in the middle of the &quot;screen&quot;. If I then zoom/rotate the Map the marker remains in the middle of the screen. Is it possible to have this behaviour except that the marker is positioned at another position? For example at the bottom in the middle? Zoom/Rotate should then maintain the marker position.</p>]]></content>
			<author>
				<name><![CDATA[jaapvandriel]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1852</uri>
			</author>
			<updated>2024-09-14T20:13:18Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9644#p9644</id>
		</entry>
</feed>
