Adding 'shaded' box like structures in WWJ Patrick Murris 2007-06-14 - patmurris.blogspot.com Add this at the end of the buildShapesLayer() method of AWT1Up.java addFilledPolylineBox(layer, Sector.fromDegrees(0, .9, 0, 0.9), 10e3, 50e3); addFilledPolylineBox(layer, Sector.fromDegrees(1, 1.9, 0, 0.9), 10e3, 150e3); addFilledPolylineBox(layer, Sector.fromDegrees(0, 0.9, 1, 1.9), 10e3, 80e3); addFilledPolylineBox(layer, Sector.fromDegrees(1, 1.9, 1, 1.9), 10e3, 200e3); and add this method just after private void addFilledPolylineBox(RenderableLayer layer, Sector s, double bottomAlt, double topAlt) { Polyline filledPolyline; Color bottomColor = new Color(.3f, .3f, .3f); Color darkSideColor = new Color(.5f, .5f, .5f); Color lightSideColor = new Color(.7f, .7f, .7f); Color topColor = new Color(.6f, .6f, .6f); ArrayList posList = new ArrayList(); posList.clear(); // Bottom face posList.add(new Position(s.getMinLatitude(), s.getMinLongitude(), bottomAlt)); posList.add(new Position(s.getMinLatitude(), s.getMaxLongitude(), bottomAlt)); posList.add(new Position(s.getMaxLatitude(), s.getMaxLongitude(), bottomAlt)); posList.add(new Position(s.getMaxLatitude(), s.getMinLongitude(), bottomAlt)); posList.add(new Position(s.getMinLatitude(), s.getMinLongitude(), bottomAlt)); filledPolyline = new Polyline(posList); filledPolyline.setFollowGreatCircles(false); filledPolyline.setFilled(true); filledPolyline.setColor(bottomColor); layer.addRenderable(filledPolyline); posList.clear(); // South face posList.add(new Position(s.getMinLatitude(), s.getMinLongitude(), bottomAlt)); posList.add(new Position(s.getMinLatitude(), s.getMaxLongitude(), bottomAlt)); posList.add(new Position(s.getMinLatitude(), s.getMaxLongitude(), topAlt)); posList.add(new Position(s.getMinLatitude(), s.getMinLongitude(), topAlt)); posList.add(new Position(s.getMinLatitude(), s.getMinLongitude(), bottomAlt)); filledPolyline = new Polyline(posList); filledPolyline.setFollowGreatCircles(false); filledPolyline.setFilled(true); filledPolyline.setColor(lightSideColor); layer.addRenderable(filledPolyline); posList.clear(); // North face posList.add(new Position(s.getMaxLatitude(), s.getMinLongitude(), bottomAlt)); posList.add(new Position(s.getMaxLatitude(), s.getMaxLongitude(), bottomAlt)); posList.add(new Position(s.getMaxLatitude(), s.getMaxLongitude(), topAlt)); posList.add(new Position(s.getMaxLatitude(), s.getMinLongitude(), topAlt)); posList.add(new Position(s.getMaxLatitude(), s.getMinLongitude(), bottomAlt)); filledPolyline = new Polyline(posList); filledPolyline.setFollowGreatCircles(false); filledPolyline.setFilled(true); filledPolyline.setColor(darkSideColor); layer.addRenderable(filledPolyline); posList.clear(); // West face posList.add(new Position(s.getMaxLatitude(), s.getMinLongitude(), bottomAlt)); posList.add(new Position(s.getMinLatitude(), s.getMinLongitude(), bottomAlt)); posList.add(new Position(s.getMinLatitude(), s.getMinLongitude(), topAlt)); posList.add(new Position(s.getMaxLatitude(), s.getMinLongitude(), topAlt)); posList.add(new Position(s.getMaxLatitude(), s.getMinLongitude(), bottomAlt)); filledPolyline = new Polyline(posList); filledPolyline.setFollowGreatCircles(false); filledPolyline.setFilled(true); filledPolyline.setColor(darkSideColor); layer.addRenderable(filledPolyline); posList.clear(); // East face posList.add(new Position(s.getMaxLatitude(), s.getMaxLongitude(), bottomAlt)); posList.add(new Position(s.getMinLatitude(), s.getMaxLongitude(), bottomAlt)); posList.add(new Position(s.getMinLatitude(), s.getMaxLongitude(), topAlt)); posList.add(new Position(s.getMaxLatitude(), s.getMaxLongitude(), topAlt)); posList.add(new Position(s.getMaxLatitude(), s.getMaxLongitude(), bottomAlt)); filledPolyline = new Polyline(posList); filledPolyline.setFollowGreatCircles(false); filledPolyline.setFilled(true); filledPolyline.setColor(lightSideColor); layer.addRenderable(filledPolyline); posList.clear(); // Top face posList.add(new Position(s.getMinLatitude(), s.getMinLongitude(), topAlt)); posList.add(new Position(s.getMinLatitude(), s.getMaxLongitude(), topAlt)); posList.add(new Position(s.getMaxLatitude(), s.getMaxLongitude(), topAlt)); posList.add(new Position(s.getMaxLatitude(), s.getMinLongitude(), topAlt)); posList.add(new Position(s.getMinLatitude(), s.getMinLongitude(), topAlt)); filledPolyline = new Polyline(posList); filledPolyline.setFollowGreatCircles(false); filledPolyline.setFilled(true); filledPolyline.setColor(topColor); layer.addRenderable(filledPolyline); } Notes : this example uses one Sector to define the four corners of a box. A more versatile version would use four LatLon objects.