<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — About drawing line on map details]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=381&amp;type=atom" />
	<updated>2017-01-11T14:57:14Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=381</id>
		<entry>
			<title type="html"><![CDATA[Re: About drawing line on map details]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1667#p1667" />
			<content type="html"><![CDATA[<p>Please send a screenshot and a script that causes the problem.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-01-11T14:57:14Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1667#p1667</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: About drawing line on map details]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1663#p1663" />
			<content type="html"><![CDATA[<p>Thanks for the reply</p><p>I mean </p><p>if I receive coordinate and draw the line on google map </p><p>when i walked straight, the line is not straight. it is unsmooth. like snake</p>]]></content>
			<author>
				<name><![CDATA[joonyboy]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=306</uri>
			</author>
			<updated>2017-01-11T10:14:49Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1663#p1663</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: About drawing line on map details]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1662#p1662" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Unfortunately, I did not understand what zigzag you mean.<br />I made a simple test script, and it works well.<br /></p><div class="codebox"><pre><code>using System.Collections.Generic;
using UnityEngine;

public class DrawLineInPoints:MonoBehaviour
{
    private List&lt;Vector2&gt; points = new List&lt;Vector2&gt;();

    private void Start()
    {
        OnlineMapsControlBase.instance.OnMapClick += OnMapClick;
    }

    private void OnMapClick()
    {
        Vector2 coords = OnlineMapsControlBase.instance.GetCoords();
        OnlineMaps.instance.AddMarker(coords);
        points.Add(coords);
        if (points.Count == 2) OnlineMaps.instance.AddDrawingElement(new OnlineMapsDrawingLine(points, Color.red, 3));
    }
}</code></pre></div><p>Screenshot attached.</p><p>If your country is not working Google Directions API, try to use Open Route Service or HERE Routing API.<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsHereRoutingAPI.html#a3c38758c01d20cb660d7c0a1edfc8ee2">http://infinity-code.com/doxygen/online … a1edfc8ee2</a><br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsOpenRouteService.html#ae02e8e96137b66d7106e2825619982bc">http://infinity-code.com/doxygen/online … 25619982bc</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-01-11T09:37:04Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1662#p1662</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[About drawing line on map details]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1659#p1659" />
			<content type="html"><![CDATA[<p>I draw the line based on Unity&#039;s gps coordinate</p><p>every update function in unity , receive current gps coordinate and stored in list</p><p>end of update I draw the line using AddDrawingElement in Online Maps.</p><p>map.AddDrawingElement(new OnlineMapsDrawingLine(line, Color.red, 3f));</p><p>but when I use the coordinate for drawing, the line is not smooth. It seems almost zigzag pattern.</p><p>I think it is because of coordinate data.</p><p>I already used google map route(GoogleMapFindDirection class). but my country did not support route function.... <img src="https://forum.infinity-code.com/img/smilies/sad.png" width="15" height="15" alt="sad" /></p><p>Is there any solution to draw the line very smoothly? (not zigzag) any retouching coordinate data or the line.. and so on ,,,,</p>]]></content>
			<author>
				<name><![CDATA[joonyboy]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=306</uri>
			</author>
			<updated>2017-01-11T07:18:09Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1659#p1659</id>
		</entry>
</feed>
