I want to start working on better cursor support for OL controls. Currently a lot of the cursors are hard-coded in javascript, without any way to override them.
I am doubting a bit between having control API properties, or doing this completely with css classes. I tend to be in favour of the API properties, since if we autogenerate css class names (ofcourse we could also work out something similar to displayClass, e.g. cursorClass), we will run into trouble with e.g. the ZoomBox Control, for which people will want a different cursor if out=true. With API Properties they will be able to do that.
When the tool is activated, the cursor on the map should be cursor X. But also in some cases people want the cursor to change on mouse down to cursor Y, for instance the pan hand in Google maps changes to a move cursor on mouse down. Also APIProperties will make it easier since we don't need a removeClass and addClass method for adding/removing css classes to the map div.
Initial proposal for APIProperties:
-cursor
-mousedownCursor
which would be set on the map div (this.map.div.style.cursor).
Thoughts welcome before I start my implementation. Especially with the decision to use css classes or to use API Properties for the cursor. TIA.