From: Lenou, P. (Contractor) <Pet...@ds...> - 2011-10-05 23:54:39
|
UNCLASSIFIED Hi, I have a WKT polygon drawn on a map via: WKT wkt = new WKT(); VectorFeature[] vectorFeatures = wkt.read(getGeometryWKT()); Vector polygonsLayer = new Vector("Polygons"); for (VectorFeature vectorFeature : vectorFeatures) polygonsLayer.addFeature(vectorFeature); I would now like to fill the polygons/bounding boxes drawn with an image. I am able to create an Image overlay on a map using Image. I did this by converting the javascript in this sample to client side code: http://openlayers.org/dev/examples/image-layer.html. However, I have the need to rotate my images an arbitrary number of degrees. There is no rotate function on the Image object. I found another sample demonstrating what I want (see http://gis.ibbeck.de/ginfo/apps/OLExamples/OL27/examples/ExternalGraphic Overlay/ExternalGraphicOverlay.asp). This sample sets the rotation angle via the Style applied to the Vector, but such a property is not available in the openlayers-gwt module. Also, I the external graphic I set does not display. The client side code I am using based on the javascript source is listed below: Vector vectorLayer = new Vector("externalGraphic Overlay"); Style style = new Style(); style. setExternalGraphic ("http://www.openlayers.org/images/OpenLayers.trac.png"); style.setGraphicOffset(50, 50); StyleMap oStyleMap = new StyleMap(style); vectorLayer.setStyleMap(oStyleMap); map.addLayer(vectorLayer); Can someone recommend a way to fill a bounding box with an image or overlay an image and be able to rotate the image a variable number of degrees? Any help is greatly appreciated. Thanks, Peter IMPORTANT: This email remains the property of the Department of Defence and is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have received this email in error, you are requested to contact the sender and delete the email. |