[mapguide-users] Mouse cursor in Ajax viewer

Chris Claydon chris.claydon at autodesk.com
Mon Jun 11 17:14:59 EDT 2007


Mouse wheel zoom is standard too.

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Chris
Gountanis
Sent: June 11, 2007 2:28 PM
To: 'MapGuide Users Mail List'
Subject: RE: [mapguide-users] Mouse cursor in Ajax viewer

Can the cursors just be added to the main code? Everyone want's the
cursors
to look somewhat different based on the mode. I would hate to have to
reedit
the templates every update for mouse wheel zoom and cursor icons. I
noticed
the loading indicator is no standard. Thanks! 

Chris


-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jackie Ng
Sent: Monday, June 11, 2007 3:11 PM
To: mapguide-users at lists.osgeo.org
Subject: Re: [mapguide-users] Mouse cursor in Ajax viewer


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#a
1106
7771
Sent from the MapGuide Users mailing list archive at Nabble.com.

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


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



More information about the mapguide-users mailing list