Hi! I'm trying to rotate the symbols around their own center but I can´t; they rotate around another point, In my opinion, the only choice is extend OpenLayers.Renderer.symbol in OpenLayers.Renderer.Elements, to define a element for each angle that I need, from 0 up to 360 degrees.
Another possibility is to create polygons but they change their size with the changes of the zoom of the map and I don´t want this, I need that their size constant. Has someone any idea of how I can do this? Thank you for your help!! Regards!!! 2008/8/4 Jose A. C. <[EMAIL PROTECTED]> > Hi! > > This solution is perfect, but I need to rotate the polygons around their > own center, since the rotate function doesn´t change their inclination, it > just change their position. > > The code is: > > features[4].geometry.rotate(30,new > OpenLayers.Geometry.Point(map.maxExtent.left + (4 * slot) + (slot / 2), 0)); > features[4].layer.drawFeature(features[4]); > > features[1].geometry.rotate(30,new > OpenLayers.Geometry.Point(5,5)); > features[1].layer.drawFeature(features[1]); > > where features array comes from the example > http://openlayers.org/dev/examples/graphic-name.html. > > Thanks!!! > > 2008/8/1 Christopher Schmidt <[EMAIL PROTECTED]> > > On Fri, Aug 01, 2008 at 08:39:54AM +0200, Jose A. C. wrote: >> > I'm making a map, and I need to create polygons on it that don´t change >> its >> > size when the zoom of the map change. I don´t use a mark because I need >> to >> > rotate it. >> >> Sounds like you want this: >> >> http://openlayers.org/dev/examples/graphic-name.html >> >> There's a set of constants in OpenLayers.Renderer.symbol in >> OpenLayers.Renderer.Elements which you could extend. >> >> >> > I have another problem: I draw different layers with different units >> and >> > when it is draw the size of the figure is the same in spite of having >> > different measures unit (Km and inches). The code is: >> >> The units of the layer have no control over anything. Your units you are >> providing are *map* units -- and the *name* you give to those units is >> irrelevant. What you want to do is change the size of the units. If you >> want to create something that's a different size, you need to provide >> the correct size in current map units. (Your map is probably in >> degrees.) >> >> Regards, >> -- >> Christopher Schmidt >> MetaCarta >> > >
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
