Google Earth API Samples - Line String Styling

Last Modified:
Installed Plugin Version:

Relevant Resources:

Relevant Code Excerpt:

// If lineStringPlacemark doesn't already have a Style associated
// with it, we create it now.
if (!lineStringPlacemark.getStyleSelector()) {

// The Style of a Feature is retrieved as feature.getStyleSelector().
// The Style itself contains a LineStyle, which is what we manipulate
// to change the color and width of the line.
var lineStyle = lineStringPlacemark.getStyleSelector().getLineStyle();
lineStyle.setWidth(lineStyle.getWidth() + 2);
lineStyle.getColor().set('6600ffff');  // aabbggrr format