/** constructs a Placemark from a Polyline overlay, as a KML LineString */
 public KmlPlacemark(Polyline polyline, KmlDocument kmlDoc) {
   this();
   mName = "LineString - " + polyline.getNumberOfPoints() + " points";
   mGeometry = new KmlLineString();
   mGeometry.mCoordinates = (ArrayList<GeoPoint>) polyline.getPoints();
   mVisibility = polyline.isEnabled();
   // Style:
   Style style = new Style();
   style.mLineStyle = new LineStyle(polyline.getColor(), polyline.getWidth());
   mStyle = kmlDoc.addStyle(style);
 }
 /** constructs a Placemark from a Polygon overlay, as a KML Polygon */
 public KmlPlacemark(Polygon polygon, KmlDocument kmlDoc) {
   this();
   mName = polygon.getTitle();
   mDescription = polygon.getSnippet();
   mGeometry = new KmlPolygon();
   mGeometry.mCoordinates = (ArrayList<GeoPoint>) polygon.getPoints();
   ((KmlPolygon) mGeometry).mHoles = (ArrayList<ArrayList<GeoPoint>>) polygon.getHoles();
   mVisibility = polygon.isEnabled();
   // Style:
   Style style = new Style();
   style.mPolyStyle = new ColorStyle(polygon.getFillColor());
   style.mLineStyle = new LineStyle(polygon.getStrokeColor(), polygon.getStrokeWidth());
   mStyle = kmlDoc.addStyle(style);
 }