<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Changing marker texture on runtime]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=358&amp;type=atom" />
	<updated>2016-12-24T20:21:05Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=358</id>
		<entry>
			<title type="html"><![CDATA[Re: Changing marker texture on runtime]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1578#p1578" />
			<content type="html"><![CDATA[<p>Hello</p><p>Online Maps takes time to redraw the map with the new marker texture.</p><p>There is one way around this:<br />Online Maps / Troubleshooting / Render In Thread - OFF.<br />Replace «map.Redraw» to «map.RedrawImmediately».</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-12-24T20:21:05Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1578#p1578</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Changing marker texture on runtime]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1577#p1577" />
			<content type="html"><![CDATA[<p>I want the new marker texture to show up instantly. This is not happening. It takes a lot of time before the new marker shows up on the map. Any help would be much appreciated. Thanks.</p><p>&nbsp; &nbsp; private void OnMarkerClick(OnlineMapsMarkerBase marker)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; float distanceInMeters = OnlineMapsUtils.DistanceBetweenPoints(marker.position, playerLocation).magnitude*1000f;<br />&nbsp; &nbsp; &nbsp; &nbsp; if (distanceInMeters &lt; 64f)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //change texture;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsMarker m = (OnlineMapsMarker)marker;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m.texture = markerTexureSolved;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m.Init();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map.Redraw();</p><p>&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }</p>]]></content>
			<author>
				<name><![CDATA[13bscsfgul]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=327</uri>
			</author>
			<updated>2016-12-24T09:56:36Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1577#p1577</id>
		</entry>
</feed>
