4

I am using ArcGISRuntime to display dots on the map as well as lines between them. The lines and the dots are displayed correctly, but I cannot set it to display the lines as arrows.

By using this line of code the dots and the lines are displayed as follows:

// create a polyline from the point collection
Polyline polyline = new Polyline(points);

//define a line symbol
SimpleLineSymbol lineSymbol =
        new SimpleLineSymbol(
                SimpleLineSymbol.Style.SOLID,
                Color.argb(255, 255, 128, 0), 1.0f);

// create the graphic with polyline and symbol
Graphic lines = new Graphic(polyline, lineSymbol);

// add graphic to the graphics overlay
poiOverlay.getGraphics().add(lines);
poiOverlay.getGraphics().addAll(poiMarkers);

I tried changing the lines for it to display it with arrows, but that doesn't seem to do anything:

SimpleLineSymbol lineSymbol =
    new SimpleLineSymbol(
            SimpleLineSymbol.Style.SOLID,
            Color.argb(255, 255, 128, 0), 1.0f, SimpleLineSymbol.MarkerStyle.ARROW, SimpleLineSymbol.MarkerPlacement.END);

What am I doing wrong here?

Micah
  • 479
  • 1
  • 7
  • 17
Richard
  • 1,087
  • 18
  • 52

0 Answers0