[mapguide-users] Mouse cursor in Ajax viewer

Jackie Ng jackie.ng at aecsystems.com.au
Mon Jun 11 16:11:06 EDT 2007


Try something like this:            


            var map = document.getElementById("map");
            switch(action)
            {
                //Zoom In
                case 7:
                //Zoom Rect
                case 9:
                    map.style.cursor = msie ? '<path to your cursor>' :
'url("<path to your cursor"), auto';
                    break;
                //Zoom Out
                case 8:
                    map.style.cursor = msie ? '<path to your cursor>' :
'url("<path to your cursor"), auto';
                    break;
                //Enter Pan
                case 1:
                    map.style.cursor = msie ? 'hand' : 'pointer';
                    break;
                default:
                    map.style.cursor = 'default';
                    break;
            }

"map" is the div element of the mapframe where the actual map image is
rendered to.

Unfortunately this code won't display the custom cursors at the same size on
different browsers.

macieksk wrote:
> 
> hi
> 
> can you put some ex. of this? (sample code)
> 
> Nimrod Cnaan pisze:
>> you can use the ajaxmappane.templ file >> at executecommand function and 
>> set the map.style .cursoras you need
> 
> 
> Maciek
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/Mouse-cursor-in-Ajax-viewer-tf3891016s16610.html#a11067771
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list