<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Adding Markers based on Latitude Longitudes]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=251&amp;type=atom" />
	<updated>2016-08-23T23:11:57Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=251</id>
		<entry>
			<title type="html"><![CDATA[Re: Adding Markers based on Latitude Longitudes]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1147#p1147" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Markers have a lot logic that works for each marker.<br />Of course, if you have a lot of markers, it will be slow.</p><p>To make this work fast, you need to make your own marker system.<br />In your case, 3D marker system.</p><p>General logic of marker system:<br />If the coordinates of the marker on the visible part of the map:<br />* If the marker does not exist, create it.<br />* Update the position of marker.<br />If the coordinates of the marker is outside of the visible part of the map, and it exists, remove it.</p><p>Fastest way to find the position of the marker in the scene see TrafficSimulation.OnRenderObject.<br /><a href="http://forum.infinity-code.com/viewtopic.php?pid=1142#p1142">http://forum.infinity-code.com/viewtopi … 1142#p1142</a><br />If someone finds a way to further optimize this code, please let me know.</p><p>But for 100k markers that will be not enough.<br />You need to minimize the number of markers, for which you need to make a calculation. <br />Here you will help the idea from the example with a million markers.<br />The main idea is: you split the map into small areas, such as 10x10 degrees or less, and calculates only the areas that are on the map.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-08-23T23:11:57Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1147#p1147</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Adding Markers based on Latitude Longitudes]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1146#p1146" />
			<content type="html"><![CDATA[<p>Hi Alex, </p><p>I can successfully generate the markers (the lat and long were wrong just as you pointed out, thanks) but I am trying to generate about 1000 3D markers(gameObjects) and there are gonna be way more about 100k eventually. but when I generate the unity experiences a freeze for about 4-5 seconds before it starts working correctly.</p><p>I did go through the thread where you tried to generate 1M markers , will something like that work for gameObjects too? (in the traffic simulation thread you mention going about generating gameObjects is easier then generating same number of markers).<br />so can you guide me as of how I should proceed? because once the markers are loaded they work quite nicely, and I dont need them visible below 4 or even 5 zoom level.</p><p>Right now I am simply using a foreach loop to iterate through a list of coordinates.</p><p>Thanks.<br />Cheers,<br />Mridul</p>]]></content>
			<author>
				<name><![CDATA[Mridul]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=225</uri>
			</author>
			<updated>2016-08-23T22:25:16Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1146#p1146</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Adding Markers based on Latitude Longitudes]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1119#p1119" />
			<content type="html"><![CDATA[<p>Hello.</p><p>It is difficult to say what the problem is, because you have not shown the script.<br />In most cases, this occurs when the confused latitude and longitude.<br />X - longitude, Y - latitude.</p><p>If your problem is something else, please show your script.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-08-17T00:46:39Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1119#p1119</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Adding Markers based on Latitude Longitudes]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1118#p1118" />
			<content type="html"><![CDATA[<p>Hi,<br />I have a few animated markers I wanna add, so I am adding them as 3d objects , when I add them in from the online map tile set control as 3d marker they work just fine , but I wanna spawn them on the map based on lat/long , so I did try using the marker 3d_example script provided, it is instantiating the marker object(clone) but it is disabled for some reason, any idea why it is behaving so? </p><p>Thanks.<br />Cheers,<br />Mridul</p>]]></content>
			<author>
				<name><![CDATA[Mridul]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=225</uri>
			</author>
			<updated>2016-08-17T00:40:39Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1118#p1118</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Adding Markers based on Latitude Longitudes]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1110#p1110" />
			<content type="html"><![CDATA[<p>Cool, thanks!</p>]]></content>
			<author>
				<name><![CDATA[Mridul]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=225</uri>
			</author>
			<updated>2016-08-15T15:09:21Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1110#p1110</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Adding Markers based on Latitude Longitudes]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1109#p1109" />
			<content type="html"><![CDATA[<p>Hello.</p><p>OnlineMaps.AddMarker<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMaps.html#a17065601f05ead6195e086fa6fad9ee8">http://infinity-code.com/doxygen/online … fa6fad9ee8</a><br />Please note: X - longitude, Y - latitude.</p><p>Example:<br /><a href="http://infinity-code.com/atlas/online-maps/pages/Marker_GPS_Example.html">http://infinity-code.com/atlas/online-m … ample.html</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-08-15T15:08:14Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1109#p1109</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Adding Markers based on Latitude Longitudes]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1108#p1108" />
			<content type="html"><![CDATA[<p>Hello,</p><p>I have a list of location cordinates&nbsp; (Lat. and Long.) and I&#039;m trying to instantiate markers on the maps based on that, I couldnt find anything in the documentation or the script to do that. Could you please guide me on would I go on about doing that?.</p><p>Thanks.</p><p>Cheers,<br />Mridul</p>]]></content>
			<author>
				<name><![CDATA[Mridul]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=225</uri>
			</author>
			<updated>2016-08-15T15:02:02Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1108#p1108</id>
		</entry>
</feed>
