barbQry.qry

  Download

More scripts: Style By Script

Syntax Highlighing:

comments, key words, predefined symbols, class members & methods, functions & classes
            
# BarbQry
# Line CartoScript demonstrating complex dashed
# line style.  Each dash also has tick mark with
# filled circle at its end.
# Script from Using CartoScripts tutorial.
# Set line color and width
LineStyleSetColor(170,85,0);
LineStyleSetLineWidth(3);
# Set dash parameters 
dashSize = 20;
half = 0.5 * dashSize;
# Set circle parameters
radius = 3;		dofill = 1;
# Draw line
while (LineStyleRoll(dashSize) <> 1) {
	dist = LineStyleGetDistanceTo(3);
	if (dist > dashSize) {
		LineStyleRollPen(half);
		LineStyleMoveTo(0,0);
		LineStyleDropAnchor(0);
		LineStyleLineTo(90,half);
		LineStyleDrawCircle(radius,dofill);
		LineStyleMoveToAnchor(0);
		LineStyleRollPen(half);
		}
	else	LineStyleRollPen(dist);
	}