I am trying to figure out a way to get actual width and height of point feature. I.e., the image + text and not just the latitude / longitude of the geometry.
So far, I learnt that I could get coordinates by using the following code:
feature.getGeometry().getCoordinates();
But this gives me the exact coordinate where the feature was added but what I want is the width and height of the feature after it has been rendered. I.e., height = height of image + height of the label.
I am doing this to start wrapping texts when two feature are very closes to each other.
to get the height and width of an icon of a point in openlayers you can use:
I must mention the fact that if you have not specified scales for the text and for the icon in the style, you will receive undefined