<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Infinity Code Forum — OnlineMapsMarkerBase.SetPosition only updates when dragging map]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1809</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1809&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in OnlineMapsMarkerBase.SetPosition only updates when dragging map.]]></description>
		<lastBuildDate>Wed, 14 Jul 2021 16:30:48 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: OnlineMapsMarkerBase.SetPosition only updates when dragging map]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=7594#p7594</link>
			<description><![CDATA[<p>Hello.</p><p>You need to call redrawing of the map after updating the marker position.<br /><a href="https://infinity-code.com/doxygen/online-maps/classOnlineMaps.html#a33983fd6e33e021795565f199d39b885">https://infinity-code.com/doxygen/onlin … 199d39b885</a></p><p>P.S. Store the result of GetCoords in a variable for later reuse.<br />This will help you avoid unnecessary performance degradation.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 14 Jul 2021 16:30:48 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=7594#p7594</guid>
		</item>
		<item>
			<title><![CDATA[OnlineMapsMarkerBase.SetPosition only updates when dragging map]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=7593#p7593</link>
			<description><![CDATA[<p>Hi,</p><p>I am not completely sure if this is a bug but I almost assume. I want to position a 2D marker below cursor position:</p><div class="codebox"><pre><code>    void TestSelector()
    {
        OnlineMapsMarker newMarker = UIMarkerController.Create(new Vector2(0f, 0f), MarkerTexture);
        Selector = newMarker;
    }

    void Update()
    {
        if (Map.control.GetCoords() != null &amp;&amp; Selector != null)
        {
            Selector.SetPosition(Map.control.GetCoords().x, Map.control.GetCoords().y);
        }
    }</code></pre></div><p>The code above does only position the marker as long as I press or hold the mouse button. If I move the cursor around without clicking, the marker doesnt change position.</p>]]></description>
			<author><![CDATA[null@example.com (DDQ)]]></author>
			<pubDate>Wed, 14 Jul 2021 14:40:00 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=7593#p7593</guid>
		</item>
	</channel>
</rss>
