I am drawing a bearing line using a line with max vertices of 2, I have the calculations for figuring out the actual bearing from the lat lon of the original point and the mouse latlon
I want to place the label on the actual mouse before the second point is placed and the line feature is drawn.
Is this actually possible?
getMouseBearing : function(firstLatLon)
{
this.map.addControl(new OpenLayers.Control.MousePosition());
this.map.events.register("mousemove", map, function(e) {
var mousePosition = this.getLonLatFromPixel(e.xy);
var bearing = getLineData(false, mousePosition, firstLatLon);
//Need something here to add label to mouse cursor
});
},
Best Answer
what about
--
see jsfiddle: http://jsfiddle.net/expedio/56gd9eb1/