Syntax Highlighing:
comments, key words, predefined symbols, class members & methods, functions & classes
# CircLineQry
# Line CartoScript demonstrating use of regularly-spaced
# symbols (filled circles) along lines.
# Script from Using CartoScripts tutorial.
# Set parameters for circles
radius = 6; dofill = 1;
# Set spacing between circles
spacing = 30;
# Set line color and width and draw line
LineStyleSetColor(170,85,0);
LineStyleSetLineWidth(3);
LineStyleDrawLine();
# Draw circle at start of line
LineStyleDrawCircle(radius,dofill);
# Draw rest of circles
while (LineStyleRoll(spacing) <> 1) {
dist = LineStyleGetDistanceTo(3);
if ( dist > spacing ) {
LineStyleDrawCircle(radius,dofill);
}
}