Topic: How to Rotate Drawings??
Hi, I wanted to know if I can rotate my drawings. I have made an Ellipse and wanted to rotate it in any degree, is there any tools in OnlineMaps for that function??
For now I tried using this code but it didn't work as intended
for(int i = 0; i < segments; i++)
{
var heading = (step * i) * OnlineMapsUtils.Deg2Rad;
var px = (r * Math.Cos(heading)) + tx1;
var py = (r / 2 * Math.Sin(heading)) + ty1;
var ang = angle * OnlineMapsUtils.Deg2Rad;
var cos = Math.Cos(ang);
var sin = Math.Sin(ang);
px = (px * cos) - (py * sin);
py = (px * sin) + (py * cos);
map.projection.TileToCoordinates(px, py, 20, out lng, out lat);
points.Add(new Vector2((float)lng, (float)lat));
}