I am trying to develop a web portal using ol5 API where user click on map and then it takes map click event coordinates as centroid of rectangle and create a rectangle of particular height and width.
Here is the code to create square
image: new ol.style.RegularShape({
fill: fill,
points: 4,
radius: 30,
angle: Math.PI / 4
})
But I want to create rectangle with center point, height and width. How to achieve this?
No comments:
Post a Comment