<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Adding an Image to the Tile just like Draw() method on OnlineMapsDraw]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1941&amp;type=atom" />
	<updated>2022-04-12T09:19:45Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1941</id>
		<entry>
			<title type="html"><![CDATA[Re: Adding an Image to the Tile just like Draw() method on OnlineMapsDraw]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8205#p8205" />
			<content type="html"><![CDATA[<p>Something like that:<br /></p><div class="codebox"><pre><code>using UnityEngine;

namespace InfinityCode.OnlineMapsSupport
{
    public class UpdateGameObjectPosition : MonoBehaviour
    {
        public GameObject target;
        public double longitude;
        public double latitude;

        private void Start()
        {
            OnlineMaps.instance.OnChangePosition += UpdatePosition;
            OnlineMaps.instance.OnChangeZoom += UpdatePosition;
        }

        private void UpdatePosition()
        {
            target.transform.position = OnlineMapsTileSetControl.instance.GetWorldPosition(longitude, latitude);
        }
    }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2022-04-12T09:19:45Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8205#p8205</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Adding an Image to the Tile just like Draw() method on OnlineMapsDraw]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8203#p8203" />
			<content type="html"><![CDATA[<p>Thank you, is there any chance there&#039;s a script example of it? For the OnChangeZoom and GetWorldPosition</p>]]></content>
			<author>
				<name><![CDATA[moonflow123]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1980</uri>
			</author>
			<updated>2022-04-12T01:35:23Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8203#p8203</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Adding an Image to the Tile just like Draw() method on OnlineMapsDraw]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8200#p8200" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Subscribe to OnlineMaps.OnChangePosition and OnlineMaps.OnChangeZoom and update the position and scale of your object in the scene or screen.<br /><a href="https://infinity-code.com/doxygen/online-maps/classOnlineMaps.html#aa5d1ad65ba903de2b1c5ac37bdd7bfa1">https://infinity-code.com/doxygen/onlin … 37bdd7bfa1</a></p><p>To convert coordinates to World Position use OnlineMapsControlBaseDynamicMesh.GetWorldPosition.<br /><a href="https://infinity-code.com/doxygen/online-maps/classOnlineMapsControlBaseDynamicMesh.html#a72cf71ab8fdc9263d81e986316068362">https://infinity-code.com/doxygen/onlin … 6316068362</a></p><p>If your object is UI element, you can convert coordinates this way:<br /><a href="https://infinity-code.com/atlas/online-maps/pages/uGUIMarkerDrawer.html">https://infinity-code.com/atlas/online- … rawer.html</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2022-04-11T18:14:36Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8200#p8200</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Adding an Image to the Tile just like Draw() method on OnlineMapsDraw]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8194#p8194" />
			<content type="html"><![CDATA[<p>Hi, is there any change or script that I can use to add a GameObject or Canvas into the map just like the Draw() method?? I wanted to add the GameObject so that it can act like a drawing, in which when I zoom, the Object size and position will not follow the camera but the size and position in which I draw or instantiate it in the OnlineMaps Tile.</p>]]></content>
			<author>
				<name><![CDATA[moonflow123]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1980</uri>
			</author>
			<updated>2022-04-11T07:08:37Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8194#p8194</id>
		</entry>
</feed>
