 "addPointToPolyline"
"addPointToPolyline"
    
    Adds a point to a polyline.
Synopsis
void addPointToPolyline(string strLayer, int
                    iPolylineIndex, int iIndex, double dX, double dY);
                
Parameters
| Parameter | Description | 
|---|---|
| strLayer | The Layer to which the point will be added. | 
| iPolylineIndex | The index of the polyline that was added to a layer. The return of the function "addPolylineToLayer". | 
| iIndex | The index refers to the points in the polyline and starts at 0. | 
| dX | The x coordinate. The coordinate should fit the coordinate system of the map being displayed. | 
| dY | The y coordinate. The coordinate should fit the coordinate system of the map being displayed. | 
Description
Adds a point to a polyline.
 Example
 Example
You can add a polyline to the viewer and the points to the polyline as follows:
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
