<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to Draw a track where a vehicle has gone in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/how-to-draw-a-track-where-a-vehicle-has-gone/m-p/356958#M1030</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am developing a GPS application for use in precision agriculture. I need to save the path where the vehicle passed. The drawing must contain the width of the vehicle. I tried using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14098630197708048" jivemacro_uid="_14098630197708048"&gt;
&lt;P&gt;gpsLayer.setTrailSymbol(new SimpleLineSymbol(new Color(200, 0, 0, 160), 20));&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the problem is that the polylines are disconnected, therefore remain gaps in the track.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Trail_ArcGIS.jpg" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/7841_Trail_ArcGIS.jpg" style="width: 620px; height: 433px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to track is equal to an automotive GPS. Does anyone have any idea how to do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Sep 2014 20:43:07 GMT</pubDate>
    <dc:creator>WillyanSchultz_Dworak</dc:creator>
    <dc:date>2014-09-04T20:43:07Z</dc:date>
    <item>
      <title>How to Draw a track where a vehicle has gone</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/how-to-draw-a-track-where-a-vehicle-has-gone/m-p/356958#M1030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am developing a GPS application for use in precision agriculture. I need to save the path where the vehicle passed. The drawing must contain the width of the vehicle. I tried using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14098630197708048" jivemacro_uid="_14098630197708048"&gt;
&lt;P&gt;gpsLayer.setTrailSymbol(new SimpleLineSymbol(new Color(200, 0, 0, 160), 20));&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the problem is that the polylines are disconnected, therefore remain gaps in the track.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Trail_ArcGIS.jpg" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/7841_Trail_ArcGIS.jpg" style="width: 620px; height: 433px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to track is equal to an automotive GPS. Does anyone have any idea how to do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 20:43:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/how-to-draw-a-track-where-a-vehicle-has-gone/m-p/356958#M1030</guid>
      <dc:creator>WillyanSchultz_Dworak</dc:creator>
      <dc:date>2014-09-04T20:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to Draw a track where a vehicle has gone</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/how-to-draw-a-track-where-a-vehicle-has-gone/m-p/356959#M1031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest you create a GraphicsLayer that contains the trail Graphic, and turn off trail in the GPSLayer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could add a listener to the GPSWatcher that is passed on the GPSLayer. Whenever the position changes you could update the trail Graphic's geometry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The trail Graphic could be of type Polyline, and you could append new position to it. Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private Polyline trail = null;&lt;/P&gt;&lt;P&gt;private int trailGraphicId;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// on position change&lt;/P&gt;&lt;P&gt;if (trail == null) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trail = new Polyline();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trail.startPath(prevLocationOnMap);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trail.lineTo(currLocationOnMap);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Graphic trailGraphic = new Graphic(trail, symTrail);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trailGraphicId = graphicsLayer.addGraphic(trailGraphic);&lt;/P&gt;&lt;P&gt; } else {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trail.lineTo(currLocationOnMap);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsLayer.updateGraphic(trailGraphicId, trail);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output will now look like&lt;/P&gt;&lt;P&gt;&lt;IMG alt="gps_trail.png" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/13595_gps_trail.png" style="width: 620px; height: 392px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 23:46:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/how-to-draw-a-track-where-a-vehicle-has-gone/m-p/356959#M1031</guid>
      <dc:creator>VijayGandhi</dc:creator>
      <dc:date>2014-09-18T23:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to Draw a track where a vehicle has gone</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/how-to-draw-a-track-where-a-vehicle-has-gone/m-p/356960#M1032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks VGandhi-esristaff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your answer solved my problem&amp;nbsp; &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 19:50:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/how-to-draw-a-track-where-a-vehicle-has-gone/m-p/356960#M1032</guid>
      <dc:creator>WillyanSchultz_Dworak</dc:creator>
      <dc:date>2014-10-24T19:50:03Z</dc:date>
    </item>
  </channel>
</rss>

