<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Lock Position and Zoom]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=307&amp;type=atom" />
	<updated>2016-10-20T14:38:38Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=307</id>
		<entry>
			<title type="html"><![CDATA[Re: Lock Position and Zoom]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1394#p1394" />
			<content type="html"><![CDATA[<p>That worked. Although I only needed the (OnlineMaps.instance.zoom = 10;) line since I want the map to start out at a specific long and lat and not the center. Thanks!</p><p>Not that it wasn&#039;t difficult to just click on the Map object. Just wanted to see if it was a bug or just me <img src="https://forum.infinity-code.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[IIIDefektIII]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=281</uri>
			</author>
			<updated>2016-10-20T14:38:38Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1394#p1394</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Lock Position and Zoom]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1391#p1391" />
			<content type="html"><![CDATA[<p>I think I understand what the problem is.<br />Try it:<br /></p><div class="codebox"><pre><code>/*     INFINITY CODE 2013-2016      */
/*   http://www.infinity-code.com   */

using UnityEngine;

namespace InfinityCode.OnlineMapsExamples
{
    /// &lt;summary&gt;
    /// Example of how to limit the position and zoom the map.
    /// &lt;/summary&gt;
    [AddComponentMenu(&quot;Infinity Code/Online Maps/Examples (API Usage)/LockPositionAndZoomExample&quot;)]
    public class LockPositionAndZoomExample : MonoBehaviour
    {
        private void Start()
        {
            // Lock map zoom range
            OnlineMaps.instance.zoomRange = new OnlineMapsRange(10, 15);

            // Lock map coordinates range
            OnlineMaps.instance.positionRange = new OnlineMapsPositionRange(33, -119, 34, -118);

            // Initializes the position and zoom
            OnlineMaps.instance.zoom = 10;
            OnlineMaps.instance.position = OnlineMaps.instance.positionRange.center;
        }
    }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-10-20T05:49:18Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1391#p1391</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Lock Position and Zoom]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1390#p1390" />
			<content type="html"><![CDATA[<p>Odd what version of Unity are you running? I am running two machines both on 5.4.1 and both do the same thing.</p>]]></content>
			<author>
				<name><![CDATA[IIIDefektIII]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=281</uri>
			</author>
			<updated>2016-10-19T19:40:32Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1390#p1390</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Lock Position and Zoom]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1388#p1388" />
			<content type="html"><![CDATA[<p>Hello</p><p>I just checked the work of this example.<br />Everything works well, even if Map GameObject is not selected.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-10-19T18:57:53Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1388#p1388</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Lock Position and Zoom]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1385#p1385" />
			<content type="html"><![CDATA[<p>Not sure this is a bug but seems so. When using the Lock Position and zoom features if you do not have the map object selected in the Hierarchy it zooms all the way out and doesn&#039;t reflect the correct positioning when you hit play until you click on the map object and then it updates to what it is suppose to be when using in the editor.</p>]]></content>
			<author>
				<name><![CDATA[IIIDefektIII]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=281</uri>
			</author>
			<updated>2016-10-19T18:34:58Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1385#p1385</id>
		</entry>
</feed>
