<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — How to translate the map with custom function]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1208&amp;type=atom" />
	<updated>2019-06-06T08:53:46Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1208</id>
		<entry>
			<title type="html"><![CDATA[Re: How to translate the map with custom function]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=5100#p5100" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Internally, Online Maps works in the same way - it converts the screen position into a tile position, and calculate the difference.<br />Honestly, I do not know how this can be implemented differently.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2019-06-06T08:53:46Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=5100#p5100</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to translate the map with custom function]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=5098#p5098" />
			<content type="html"><![CDATA[<p>Hello,<br />I&#039;d like to implement my own controllers to move, scale and rotate the map with touch on mobile device.<br />Actually in my classes I&#039;m using a function like this one to move the map from one point to another one:</p><p>OnlineMaps.instance.projection.CoordinatesToTile(longitude, latitude, OnlineMaps.instance.zoom,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; out double tx, out double ty);<br />OnlineMaps.instance.SetTilePosition(tx, ty);</p><p>but I think it&#039;s not a good idea to convert touch screen position in gps position, than get the difference, etc etc.</p><p>I&#039;d like to be able to translate the map in a good and reliable way from screen delta positions, just like you did with the default touch control that you implemented (that I had to disable to not interfere with some others touch controls).<br />Could you suggest me how to do that?<br />Many thanks!</p>]]></content>
			<author>
				<name><![CDATA[danielesuppo]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=956</uri>
			</author>
			<updated>2019-06-05T19:28:02Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=5098#p5098</id>
		</entry>
</feed>
