Here is a small patch to make the map cursor reflect the active toolbar
action.
function UpdateMapActionCursor(action)
{
  var strCursor = "auto";
  switch(action)
  {
    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)
{
    if(!mapInit)
        return;
    CancelDigitization();
    UpdateMapActionCursor(action);
    switch(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.

http://www.nabble.com/file/p20789750/MapguideCursor.zip MapguideCursor.zip 
-- 
View this message in context: 
http://www.nabble.com/Patch-to-change-the-active-tool-Cursor-in-ajax-viewer-tp20789750p20789750.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to