You can use the following function to rotate an image, element is the image and degree is the angle you would like to rotate, zero is when an arrow is up to the north:
function (element, degree) {
if (navigator.userAgent.match("Chrome")) {
element.style.WebkitTransform = "rotate(" + degree + "deg)";
}
else if (navigator.userAgent.match("Firefox")) {
element.style.MozTransform = "rotate(" + degree + "deg)";
}
else if (navigator.userAgent.match("MSIE")) {
element.style.msTransform = "rotate(" + degree + "deg)";
}
else if (navigator.userAgent.match("Opera")) {
element.style.OTransform = "rotate(" + degree + "deg)";
}
else {
element.style.transform = "rotate(" + degree + "deg)";
}
}
Best regards,
Chen