"addPolylineToLayer"

Adds a polyline to a layer.

Synopsis

int addPolylineToLayer(string strLayer, string strName, long iNumPoints);

Parameters

Parameter Description
strLayer The name of the layer the polyline will be added to.
strName The name of the polyline that will be added to a layer.
iNumPoints Number of points that will be added to a polyline.

Description

Adds a polyline to a layer.

Example

The following code adds a polyline to a layer and the points to the polyline.

main()
{
  int i;
  GisViewer_ewo1.addEmptyLayer("EWO");
  GisViewer_ewo1.setLayerFillColor("EWO","blue");
  GisViewer_ewo1.setLayerLineColor("EWO","blue");
  i = GisViewer_ewo1.addPolylineToLayer("EWO", "Helsinki", 4);
  GisViewer_ewo1.addPointToPolyline("EWO", i, 0, 25, 60);
  GisViewer_ewo1.addPointToPolyline("EWO", i, 1, 26, 61);
  GisViewer_ewo1.addPointToPolyline("EWO", i, 2, 24, 62);
  GisViewer_ewo1.addPointToPolyline("EWO", i, 3, 25, 60);
}

The code above will add a polyline above Helsinki Finland.

The layer the polyline will be added to must be a layer that was added using the function "addEmptyLayer". The function addPolylineToLayer() is not supported on an existing "normal"; layer.

Assignment

GIS Viewer