"setPolyLineGradient"

Sets a polyline gradient.

Synopsis

void setPolyLineGradient(string strLayer, string strField, string strValue, string strPattern, double dPercent, int iLength);

Parameters

Parameter Description
strLayer The name of the layer whose polyline will be set to gradient.
strField The name of the layer field.
strValue The name of the polyline.
strPattern The pattern that should be set. At the moment the pattern "water" is supported.
dPercent The percent for the pattern setting.
iLength The length for the pattern.

Description

Sets a polyline gradient.

Example

Adds a polyline to the GIS viewer and sets the polyline gradient.

main()
{
  GisViewer_ewo1.addEmptyLayer("EWO");
  GisViewer_ewo1.setLayerFillColor("EWO","red");
  GisViewer_ewo1.setLayerLineColor("EWO","red");
  int iPoly;
  iPoly = GisViewer_ewo1.addPolylineToLayer( "EWO", "Helsinki", 4 );
  //adds a polyline
  GisViewer_ewo1.addPointToPolyline( iPoly, 0, 25, 60 );
  GisViewer_ewo1.addPointToPolyline( iPoly, 1, 26, 61 );
  GisViewer_ewo1.addPointToPolyline( iPoly, 2, 24, 62 );
  GisViewer_ewo1.addPointToPolyline( iPoly, 3, 25, 60 );
  GisViewer_ewo1.setPolyLineGradient( "EWO", "NAME", "Helsinki", "water",2, 1 ); //sets the polyline gradient
}

Assignment

GIS Viewer