My requirement is to show dynamic label on polygon feature's segments with some offset. The label text should have the rank of each segment. If it is a square which starts at top left corner it will look as
1 ------- | | 4| |2 | | -------- 3
Can anyone give me some pointers in achieving this using OpenLayers?