<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Center the map at the user's location]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=669&amp;type=atom" />
	<updated>2017-10-04T18:50:43Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=669</id>
		<entry>
			<title type="html"><![CDATA[Re: Center the map at the user's location]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2889#p2889" />
			<content type="html"><![CDATA[<p>Thank you very much, Alex Vertax!</p>]]></content>
			<author>
				<name><![CDATA[Rumata]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=537</uri>
			</author>
			<updated>2017-10-04T18:50:43Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2889#p2889</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Center the map at the user's location]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2887#p2887" />
			<content type="html"><![CDATA[<p>Example:<br /></p><div class="codebox"><pre><code>Vector2 pos = OnlineMapsLocationService.instance.position;
OnlineMaps.instance.SetPosition(pos.x, pos.y);</code></pre></div><p>or<br /></p><div class="codebox"><pre><code>OnlineMaps.instance.position = OnlineMapsLocationService.instance.position;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-10-04T17:33:06Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2887#p2887</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Center the map at the user's location]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2886#p2886" />
			<content type="html"><![CDATA[<p>Thank you,<br />Should I somehow extract the latitude and longitude from the OnlineMapsLocationService.instance.position and assign it to 2 variables and then use them as parameters for the OnlineMaps.instance.SetPositio()?</p><p>Because this way it doesn&#039;t work:<br /> OnlineMaps.instance.SetPosition(OnlineMapsLocationService.instance.position);</p>]]></content>
			<author>
				<name><![CDATA[Rumata]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=537</uri>
			</author>
			<updated>2017-10-04T13:09:34Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2886#p2886</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Center the map at the user's location]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2881#p2881" />
			<content type="html"><![CDATA[<p>Hello.</p><p>OnlineMaps.SetPosition is the right way.</p><p>OnlineMapsLocationService.position<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsLocationService.html#a091d36c76813c70f218082164baf7eb5">http://infinity-code.com/doxygen/online … 164baf7eb5</a><br />Important: position not available Start, because GPS is not already initialized.<br />Use OnLocationInited event, to determine the initialization of GPS.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-10-02T23:03:44Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2881#p2881</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Center the map at the user's location]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2878#p2878" />
			<content type="html"><![CDATA[<p>Hello,</p><p>Is there a function which I can call to center the 2D map on the current user&#039;s location?</p><p>Location Services allows me to automatically center map after some period of time, which is not what I need in my case.</p><p>Currently, I&#039;m using a custom script for checking user&#039;s location and then centering the map using:</p><p>OnlineMaps.instance.SetPosition(longitude, latitude);</p><p>Is there another way (function) designed by Online Maps for centering the map on the user location? </p><p>Or if using SetPosition is a right way, how can I get user&#039;s location from Online Maps Location Services (instead of using a custom script for it)?</p><p>Thank you!</p>]]></content>
			<author>
				<name><![CDATA[Rumata]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=537</uri>
			</author>
			<updated>2017-10-02T21:16:11Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2878#p2878</id>
		</entry>
</feed>
