Align Labels to Shape Direction

Topics: Help
Jan 18, 2013 at 7:02 PM

Hi Guys!

I am drawing different shapes into map, (polygons, lines) and I am overriding their onrender method to show a label Inside or beside of them.

 

But I would like the labels to follow the way of the line, or polygon.

 

I believe I need to rotate the label but don't know where to start

 

any Clues?