<?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 Re: how trace polyline between two points? in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-trace-polyline-between-two-points/m-p/696208#M17873</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can create a PointCollection containing the two points and create a Polyline object adding the PointCollection to its Paths:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;ESRI.ArcGIS.Client.Geometry.&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-size: 2; font-family: Consolas;"&gt;PointCollection&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt; pointCollection = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 2; font-family: Consolas;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt; ESRI.ArcGIS.Client.Geometry.&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-size: 2; font-family: Consolas;"&gt;PointCollection&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;();&lt;/SPAN&gt;
&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;pointCollection.Add(startPoint);&lt;/SPAN&gt;
&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;pointCollection.Add(endPoint&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;);&lt;/SPAN&gt;
&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;ESRI.ArcGIS.Client.Geometry.&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-size: 2; font-family: Consolas;"&gt;Polyline&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt; polyline = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 2; font-family: Consolas;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt; ESRI.ArcGIS.Client.Geometry.&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-size: 2; font-family: Consolas;"&gt;Polyline&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;();&lt;/SPAN&gt;
&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;polyline.Paths.Add(pointCollection);&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;To trace the line listen to your Map_MouseMove event handler and add a Graphic object to your GraphicsLayer setting its Geometry to the above Polyline object (the end point in this case will be always the point you are getting from GetPosition() method of the MouseEventArgs). To avoid drawing multiple lines on your layer you should check whether the Graphic object has been already added to your layer and if the layer contains your Graphic just set its Geometry to the new Polyline object that you are creating on your MouseMove event handler.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 05:18:31 GMT</pubDate>
    <dc:creator>AliMirzabeigi</dc:creator>
    <dc:date>2021-12-12T05:18:31Z</dc:date>
    <item>
      <title>how trace polyline between two points?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-trace-polyline-between-two-points/m-p/696207#M17872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How i can draw a line between two points...e.g.: I have initial point and endpoint &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and i need trace a line between this points...how i can do that?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 12:03:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-trace-polyline-between-two-points/m-p/696207#M17872</guid>
      <dc:creator>StefhanCampos</dc:creator>
      <dc:date>2010-11-30T12:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: how trace polyline between two points?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-trace-polyline-between-two-points/m-p/696208#M17873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can create a PointCollection containing the two points and create a Polyline object adding the PointCollection to its Paths:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;ESRI.ArcGIS.Client.Geometry.&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-size: 2; font-family: Consolas;"&gt;PointCollection&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt; pointCollection = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 2; font-family: Consolas;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt; ESRI.ArcGIS.Client.Geometry.&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-size: 2; font-family: Consolas;"&gt;PointCollection&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;();&lt;/SPAN&gt;
&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;pointCollection.Add(startPoint);&lt;/SPAN&gt;
&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;pointCollection.Add(endPoint&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;);&lt;/SPAN&gt;
&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;ESRI.ArcGIS.Client.Geometry.&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-size: 2; font-family: Consolas;"&gt;Polyline&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt; polyline = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 2; font-family: Consolas;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt; ESRI.ArcGIS.Client.Geometry.&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-size: 2; font-family: Consolas;"&gt;Polyline&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;();&lt;/SPAN&gt;
&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;polyline.Paths.Add(pointCollection);&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;To trace the line listen to your Map_MouseMove event handler and add a Graphic object to your GraphicsLayer setting its Geometry to the above Polyline object (the end point in this case will be always the point you are getting from GetPosition() method of the MouseEventArgs). To avoid drawing multiple lines on your layer you should check whether the Graphic object has been already added to your layer and if the layer contains your Graphic just set its Geometry to the new Polyline object that you are creating on your MouseMove event handler.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:18:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-trace-polyline-between-two-points/m-p/696208#M17873</guid>
      <dc:creator>AliMirzabeigi</dc:creator>
      <dc:date>2021-12-12T05:18:31Z</dc:date>
    </item>
  </channel>
</rss>

