<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Drawing multiple lines with Google API]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=154&amp;type=atom" />
	<updated>2016-05-13T20:51:34Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=154</id>
		<entry>
			<title type="html"><![CDATA[Re: Drawing multiple lines with Google API]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=702#p702" />
			<content type="html"><![CDATA[<p>Hello.</p><p>In your case, you have 50 identical lines.<br />Move «List &lt;Vector2&gt; points = new List &lt;Vector2&gt; ();» inside the foreach.</p><div class="codebox"><pre><code>foreach (SentimentMarker sentimentMarker in _sentimentMarkers)
{
    List&lt;Vector2&gt; points = new List&lt;Vector2&gt;();</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-05-13T20:51:34Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=702#p702</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Drawing multiple lines with Google API]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=701#p701" />
			<content type="html"><![CDATA[<p>Hey there,</p><p>Here&#039;s some sample code of mine. I&#039;m only seeing only line shown on my map whereas there should be 50.</p><p>Cheers,</p><p>&nbsp; &nbsp; private void DrawPersonalLinks()<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; List&lt;Vector2&gt; points = new List&lt;Vector2&gt;();</p><p>&nbsp; &nbsp; &nbsp; &nbsp; foreach (SentimentMarker sentimentMarker in _sentimentMarkers)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; points.Clear();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; points.Add(_yourLocationStaticMapMarker.position);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; points.Add(sentimentMarker.position);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsDrawingLine line = new OnlineMapsDrawingLine(points, Color.white);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Draw the line route on the map.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMaps.instance.AddDrawingElement(line);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }</p>]]></content>
			<author>
				<name><![CDATA[pgeorges-dpt]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=133</uri>
			</author>
			<updated>2016-05-13T19:50:50Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=701#p701</id>
		</entry>
</feed>
