<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — How to draw a line between 2 markers in?]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=858&amp;type=atom" />
	<updated>2018-07-02T02:29:12Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=858</id>
		<entry>
			<title type="html"><![CDATA[Re: How to draw a line between 2 markers in?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3674#p3674" />
			<content type="html"><![CDATA[<p>thans,it&#039;s work!</p>]]></content>
			<author>
				<name><![CDATA[137110518]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=764</uri>
			</author>
			<updated>2018-07-02T02:29:12Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3674#p3674</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to draw a line between 2 markers in?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3673#p3673" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Example:<br /></p><div class="codebox"><pre><code>using System.Collections.Generic;
using UnityEngine;

public class TwoMarkersLine:MonoBehaviour
{
    private List&lt;Vector2&gt; points;

    private void OnGUI()
    {
        if (GUILayout.Button(&quot;Add marker&quot;))
        {
            OnlineMapsMarker lastMarker = OnlineMaps.instance.AddMarker(Random.Range(-180f, 180f), Random.Range(-80f, 80f));
            points[1] = lastMarker.position; // Just update the line item in the list
            OnlineMaps.instance.Redraw();
        }
    }

    private void Start()
    {
        OnlineMapsMarker firstMarker = OnlineMaps.instance.AddMarker(Random.Range(-180f, 180f), Random.Range(-80f, 80f));
        OnlineMapsMarker lastMarker = OnlineMaps.instance.AddMarker(Random.Range(-180f, 180f), Random.Range(-80f, 80f));

        points = new List&lt;Vector2&gt;
        {
            firstMarker.position,
            lastMarker.position
        };

        OnlineMapsDrawingLine line = new OnlineMapsDrawingLine(points, Color.red, 3);
        OnlineMaps.instance.AddDrawingElement(line);
    }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2018-07-01T21:56:51Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3673#p3673</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to draw a line between 2 markers in?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3672#p3672" />
			<content type="html"><![CDATA[<p>1. I want to draw a line between 2 markers<br />2. click button add new marker,to draw a line between the marker and last marker.</p>]]></content>
			<author>
				<name><![CDATA[137110518]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=764</uri>
			</author>
			<updated>2018-06-30T04:32:21Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3672#p3672</id>
		</entry>
</feed>
