[OpenLayers-Users] Center of rotation for vector features

Andreas Hocevar ahocevar at opengeo.org
Wed May 12 03:23:39 EDT 2010


This sounds like an issue we had in OpenLayers 2.9, but was fixed in 2.9.1. Make sure you are using the latest version.

Regards,
Andreas.

On May 12, 2010, at 02:16 , Mike Purvis wrote:

> Hey,
> 
> I'm having an issue with specifying rotation for one of my features. It's a point feature with a externalGraphic specified, and the center of rotation of the feature seems to be initially set to the feature's own Point.
> 
> However, when I programmatically move the feature, the center of rotation doesn't move with it, and the feature's rotation against an external center causes it to be way off-position.
> 
> I've tried implementing the move both by updating the x and y fields directly in the Point object itself, and also by using the Feature.move function. Neither has the desired effect—using the Web Inspector, I can clearly see the SVG element and the rotation is being specified in (angle, cx, cy) form.
> 
> As a last resort, I'm willing to use external JavaScript to find the element and manually insert the rotation which I require, but is there some way to do it "properly" using OpenLayers' own rotation stylings?
> 
> Thanks,
> 
> Mike
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.




More information about the Users mailing list