user10496245
user10496245

Reputation: 217

How to move, rotate polygon in openlayers 4.x?

I have a openlayers 4.x project where I am drawing polygon. I want to move polygon on openlayers map and also want to rotate the polygon so that points inside the polygon also rotate together, is it possible?

Upvotes: 1

Views: 2073

Answers (1)

Viglino Jean-Marc
Viglino Jean-Marc

Reputation: 1421

You can try the ol/interaction/Transform. http://viglino.github.io/ol-ext/examples/interaction/map.interaction.transform.html

It's an interaction to translate, rotate and scale any feature on the map. You can also rotate many features at a time or change the rotation center.

Upvotes: 2

Related Questions