<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Location Service 3D Marker]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=274&amp;type=atom" />
	<updated>2016-09-11T11:58:49Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=274</id>
		<entry>
			<title type="html"><![CDATA[Re: Location Service 3D Marker]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1238#p1238" />
			<content type="html"><![CDATA[<p>I do not know for what you need it, but in any case give an example:<br /></p><div class="codebox"><pre><code>using UnityEngine;

public class ShowMarkerAtBottom:MonoBehaviour
{
    private void Start()
    {
        OnlineMapsControlBase.instance.allowUserControl = false;
        OnlineMapsLocationService.instance.OnLocationChanged += OnLocationChanged;
    }

    private void OnLocationChanged(Vector2 vector2)
    {
        double px, py;
        Vector2 p = OnlineMapsLocationService.instance.position;
        OnlineMaps map = OnlineMaps.instance;
        map.projection.CoordinatesToTile(p.x, p.y, map.zoom, out px, out py);
        py -= map.height / OnlineMapsUtils.tileSize / 2;
        map.projection.TileToCoordinates(px, py, map.zoom, out px, out py);
        map.SetPosition(px, py);
    }
}</code></pre></div><p>P.S. Online Maps Location Service / Update Map Position - OFF.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-09-11T11:58:49Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1238#p1238</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Location Service 3D Marker]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1236#p1236" />
			<content type="html"><![CDATA[<p>I mean the marker of the location service, which is the player in my case.&nbsp; This marker shows the current position always centered on the map / display. But i want it at the bottom of the screen.</p>]]></content>
			<author>
				<name><![CDATA[mschakulat]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=224</uri>
			</author>
			<updated>2016-09-11T07:38:14Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1236#p1236</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Location Service 3D Marker]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1234#p1234" />
			<content type="html"><![CDATA[<p>What do you mean «marker always at the bottom of the display»?<br />For what you need marker in this case?</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-09-10T22:06:18Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1234#p1234</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Location Service 3D Marker]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1233#p1233" />
			<content type="html"><![CDATA[<p>Sorry, i did not clearly say what i want.<br />My goal is to have the marker always at the bottom of the display. I did not mean the vertical position. It seems i misunderstood the align setting <img src="https://forum.infinity-code.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[mschakulat]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=224</uri>
			</author>
			<updated>2016-09-10T15:34:11Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1233#p1233</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Location Service 3D Marker]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1232#p1232" />
			<content type="html"><![CDATA[<p>Hello.</p><p>3D markers do not have align. It&#039;s just not necessary.</p><p>You can work around this in the following way:<br />Create a new GameObject. Add your prefab as a child of the new GameObject.<br />Move the inner GameObject up to «y = 0» was at the bottom of GameObject.<br />Create prefab from the outer GameObject and use it as a 3D marker prefab.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-09-10T15:12:39Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1232#p1232</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Location Service 3D Marker]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1231#p1231" />
			<content type="html"><![CDATA[<p>Hi..<br />I added the Online Maps Location Service Script and enabled the 3D marker. It works like expected and the marker will be shown centered on the map. Is it possible to show the marker always at the bottom? If i use a 2D Marker, there is an option for the align, but it don&#039;t work for me, as the marker is always centered. But if i use the 3D marker the option is missing anyway.</p><p>Michael</p>]]></content>
			<author>
				<name><![CDATA[mschakulat]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=224</uri>
			</author>
			<updated>2016-09-10T09:03:48Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1231#p1231</id>
		</entry>
</feed>
