Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an svg image and I want to rotate it around itself so I do the following:

var origin = new OpenLayers.Geometry.Point(vertices[0].x,vertices[0].y);            
feature.geometry.rotate(90 ,origin);

but nothing happens. Does anyone know why?

Thanks in advance.

share|improve this question

I think you need to use :


Check this example :

share|improve this answer

dont try it with point, you cant understand your obj. rotate or not...this code is for linestring and works good.

var line = new OpenLayers.Feature.Vector(
                new OpenLayers.Geometry.LineString(points),null,null);

var origin = new OpenLayers.Geometry.Point(10, 10);

line.geometry.rotate(30, origin);

i hope it helps you...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.