<?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 Line with an arrow head in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/line-with-an-arrow-head/m-p/1115940#M2509</link>
    <description>&lt;P&gt;I want to draw a line with an arrow on the end.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            PointCollection polylinePoints = &lt;SPAN&gt;new &lt;/SPAN&gt;PointCollection(SpatialReferences.&lt;SPAN&gt;getWgs84&lt;/SPAN&gt;())&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;            polylinePoints.add(&lt;SPAN&gt;new &lt;/SPAN&gt;Point(10&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;10&lt;/SPAN&gt;))&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;            polylinePoints.add(&lt;SPAN&gt;new &lt;/SPAN&gt;Point(20&lt;SPAN&gt;, 20&lt;/SPAN&gt;))&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;            Polyline polyline = &lt;SPAN&gt;new &lt;/SPAN&gt;Polyline(polylinePoints)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;                    SimpleLineSymbol lineSymbol = &lt;SPAN&gt;new &lt;/SPAN&gt;SimpleLineSymbol(SimpleLineSymbol.Style.&lt;SPAN&gt;SOLID&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                    &lt;SPAN&gt;0xFF0063FF&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;SimpleLineSymbol.MarkerStyle.&lt;SPAN&gt;ARROW&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;SimpleLineSymbol.MarkerPlacement.&lt;SPAN&gt;END&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt; &lt;BR /&gt;&lt;/SPAN&gt;            Graphic polylineGraphic = &lt;SPAN&gt;new &lt;/SPAN&gt;Graphic(polyline&lt;SPAN&gt;, &lt;/SPAN&gt;lineSymbol)&lt;SPAN&gt;;&lt;BR /&gt;           &lt;BR /&gt;            //as i read the sceneView should be in Static rendering mode for using  SimpleLineSymbol.MarkerStyle.ARROW&lt;BR /&gt;            sceneView.getArcGISScene().getLoadSettings().setPreferredPolylineFeatureRenderingMode(FeatureLayer.RenderingMode.STATIC);&lt;BR /&gt;            sceneView.getArcGISScene().getLoadSettings().setPreferredPointFeatureRenderingMode(FeatureLayer.RenderingMode.STATIC);&lt;BR /&gt;            sceneView.getArcGISScene().getLoadSettings().setPreferredPolygonFeatureRenderingMode(FeatureLayer.RenderingMode.STATIC);&lt;BR /&gt;&lt;BR /&gt;            graphicsOverlay.getGraphics().add(polylineGraphic);&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;But it doen't work. Line is drawn but without arrow on its head&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VanyaIvanov_0-1636614749331.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27204i06808D2DB7AEC64D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VanyaIvanov_0-1636614749331.png" alt="VanyaIvanov_0-1636614749331.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How to draw a line with an arrow on the Scene using arcgis runtime api for Java?&lt;/P&gt;</description>
    <pubDate>Thu, 11 Nov 2021 07:14:35 GMT</pubDate>
    <dc:creator>VanyaIvanov</dc:creator>
    <dc:date>2021-11-11T07:14:35Z</dc:date>
    <item>
      <title>Line with an arrow head</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/line-with-an-arrow-head/m-p/1115940#M2509</link>
      <description>&lt;P&gt;I want to draw a line with an arrow on the end.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            PointCollection polylinePoints = &lt;SPAN&gt;new &lt;/SPAN&gt;PointCollection(SpatialReferences.&lt;SPAN&gt;getWgs84&lt;/SPAN&gt;())&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;            polylinePoints.add(&lt;SPAN&gt;new &lt;/SPAN&gt;Point(10&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;10&lt;/SPAN&gt;))&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;            polylinePoints.add(&lt;SPAN&gt;new &lt;/SPAN&gt;Point(20&lt;SPAN&gt;, 20&lt;/SPAN&gt;))&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;            Polyline polyline = &lt;SPAN&gt;new &lt;/SPAN&gt;Polyline(polylinePoints)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;                    SimpleLineSymbol lineSymbol = &lt;SPAN&gt;new &lt;/SPAN&gt;SimpleLineSymbol(SimpleLineSymbol.Style.&lt;SPAN&gt;SOLID&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                    &lt;SPAN&gt;0xFF0063FF&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;SimpleLineSymbol.MarkerStyle.&lt;SPAN&gt;ARROW&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;SimpleLineSymbol.MarkerPlacement.&lt;SPAN&gt;END&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt; &lt;BR /&gt;&lt;/SPAN&gt;            Graphic polylineGraphic = &lt;SPAN&gt;new &lt;/SPAN&gt;Graphic(polyline&lt;SPAN&gt;, &lt;/SPAN&gt;lineSymbol)&lt;SPAN&gt;;&lt;BR /&gt;           &lt;BR /&gt;            //as i read the sceneView should be in Static rendering mode for using  SimpleLineSymbol.MarkerStyle.ARROW&lt;BR /&gt;            sceneView.getArcGISScene().getLoadSettings().setPreferredPolylineFeatureRenderingMode(FeatureLayer.RenderingMode.STATIC);&lt;BR /&gt;            sceneView.getArcGISScene().getLoadSettings().setPreferredPointFeatureRenderingMode(FeatureLayer.RenderingMode.STATIC);&lt;BR /&gt;            sceneView.getArcGISScene().getLoadSettings().setPreferredPolygonFeatureRenderingMode(FeatureLayer.RenderingMode.STATIC);&lt;BR /&gt;&lt;BR /&gt;            graphicsOverlay.getGraphics().add(polylineGraphic);&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;But it doen't work. Line is drawn but without arrow on its head&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VanyaIvanov_0-1636614749331.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27204i06808D2DB7AEC64D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VanyaIvanov_0-1636614749331.png" alt="VanyaIvanov_0-1636614749331.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How to draw a line with an arrow on the Scene using arcgis runtime api for Java?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 07:14:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/line-with-an-arrow-head/m-p/1115940#M2509</guid>
      <dc:creator>VanyaIvanov</dc:creator>
      <dc:date>2021-11-11T07:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Line with an arrow head</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/line-with-an-arrow-head/m-p/1115984#M2511</link>
      <description>&lt;P&gt;I can see the problem here, the rendering mode for a GraphicsOverlay is set when you instantiate it.&amp;nbsp; The default constructor will set it in DYNAMIC, but there is an &lt;A href="https://developers.arcgis.com/java/api-reference/reference/com/esri/arcgisruntime/mapping/view/GraphicsOverlay.html#%3Cinit%3E(com.esri.arcgisruntime.mapping.view.GraphicsOverlay.RenderingMode)" target="_self"&gt;overload&lt;/A&gt; which allows you to set this yourself.&lt;/P&gt;&lt;P&gt;The code you've written for changing the rendering mode is for feature layers.&lt;/P&gt;&lt;P&gt;Using the following code, I've managed to render your arrowhead:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;      PointCollection polylinePoints = new PointCollection(SpatialReferences.getWgs84());
      polylinePoints.add(new Point(10, 10));
      polylinePoints.add(new Point(20, 20));

      Polyline polyline = new Polyline(polylinePoints);

      SimpleLineSymbol lineSymbol = new SimpleLineSymbol(SimpleLineSymbol.Style.SOLID,
          0xFF0063FF, 7, SimpleLineSymbol.MarkerStyle.ARROW, SimpleLineSymbol.MarkerPlacement.END);

      Graphic polylineGraphic = new Graphic(polyline, lineSymbol);

      GraphicsOverlay graphicsOverlay = new GraphicsOverlay(GraphicsOverlay.RenderingMode.STATIC);
      sceneView.getGraphicsOverlays().add(graphicsOverlay);

      graphicsOverlay.getGraphics().add(polylineGraphic);&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarkBaird_0-1636627456000.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27215i06C2AFDFAEB8C223/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MarkBaird_0-1636627456000.png" alt="MarkBaird_0-1636627456000.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am however going to look at&amp;nbsp; making the arrow head to render in the dynamic rendering mode for a future release.&lt;/P&gt;&lt;P&gt;Does this help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 10:49:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/line-with-an-arrow-head/m-p/1115984#M2511</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2021-11-11T10:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Line with an arrow head</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/line-with-an-arrow-head/m-p/1115992#M2512</link>
      <description>&lt;P&gt;Thank you Mark! it works!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 11:38:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/line-with-an-arrow-head/m-p/1115992#M2512</guid>
      <dc:creator>VanyaIvanov</dc:creator>
      <dc:date>2021-11-11T11:38:59Z</dc:date>
    </item>
  </channel>
</rss>

