Here is a small patch to make the map cursor reflect the active toolbar
function UpdateMapActionCursor(action)
  var strCursor = "auto";
    case 1: /*pan*/            strCursor = "url('../stdicons/icon_pan.cur'),
pointer";    break;
    case 9: /*Zoom window*/    strCursor =
"url('../stdicons/icon_zoomrect.cur'), pointer";    break;
    case 7: /*Zoom plus*/      strCursor =
"url('../stdicons/icon_zoomin.cur'), pointer";    break;
    case 8: /*Zoom minus*/     strCursor =
"url('../stdicons/icon_zoomout.cur'), pointer";    break;
  document.getElementById("tbMap").style.cursor = strCursor;

function ExecuteMapAction(action)
 it has been tested on IE7,FF3.04 and Chrome

It would be great if this piece of code was in the Mapguide core.
It's possible for a custom applications to override the ExecuteMapAction,
but i think this is usefull for all Mapguide users. And as the
ExecuteMapAction function is not an official API, it could change in future
release, and this make it difficult to maintain.

If you want to test it in Mapguide 2.02 , i've included in attachement the
complete ajaxmappane.templ and the cursor file itself. Don't forget to make
a backup of the existing templ file...
Just replace the existing www/viewerfiles/ajaxmappane.templ and copy the
cursor file in the www/stdicons directory. 
View this message in context:
Sent from the MapGuide Users mailing list archive at

mapguide-users mailing list

Reply via email to