<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Zoom the map to the bounds of an object]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1223&amp;type=atom" />
	<updated>2019-06-10T23:31:31Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1223</id>
		<entry>
			<title type="html"><![CDATA[Re: Zoom the map to the bounds of an object]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=5137#p5137" />
			<content type="html"><![CDATA[<p>Many thanks! It seem to be just what I need.<br />It&#039;s incredible how many functions are implemented in OnLineMaps</p>]]></content>
			<author>
				<name><![CDATA[danielesuppo]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=956</uri>
			</author>
			<updated>2019-06-10T23:31:31Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=5137#p5137</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Zoom the map to the bounds of an object]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=5129#p5129" />
			<content type="html"><![CDATA[<p>Hello.</p><p>2. OnlineMaps.GetCorners.<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMaps.html#acd05d23678cd37919b32b5d91edd9f1c">http://infinity-code.com/doxygen/online … d91edd9f1c</a></p><p>4. The differences in lng / lat are different.<br />Sorry for the tautology.<br />The map is counted in tiles from the coordinate of the center point.<br />Tiles at the same zoom level may contain a different number of degrees of latitude and longitude.<br />The difference in tile positions is x2 and x0.5.</p><p>P.S. Most likely you are looking for OnlineMapsUtils.GetCenterPointAndZoom.<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsUtils.html#a13f0d279fa7fcd3c632aa2cc18081dc8">http://infinity-code.com/doxygen/online … cc18081dc8</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2019-06-09T18:53:36Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=5129#p5129</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Zoom the map to the bounds of an object]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=5126#p5126" />
			<content type="html"><![CDATA[<p>Hello,<br />I&#039;d like to be able to zoom the map so that it fit an object.<br />To do that my idea is to:<br />1 - get the max and min bounds of the object and convert that in long/lat positions<br />2 - get the bounds (corners) of the map as long/lat positions<br />3 - get the difference<br />4 - calculate the new zoom level to fit the object</p><p>My problems are:<br />2 - I can&#039;t remember how to get the corners of the map... <img src="https://forum.infinity-code.com/img/smilies/hmm.png" width="15" height="15" alt="hmm" /><br />4 - Which is the difference in long/lat from each zoom level? Is it 2x / 0.5x ?</p><p>P.s. maybe there&#039;s a better way?<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-09T16:45:18Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=5126#p5126</id>
		</entry>
</feed>
