[mapguide-internals] Google Chrome cursor displacement in Ajax viewer

Gabriele Monfardini gabrimonfa at gmail.com
Fri Aug 31 05:25:21 PDT 2012


Hi, this is a Chromium/Chrome bug

https://code.google.com/p/chromium/issues/detail?id=145919
http://code.google.com/p/chromium/issues/detail?id=12578


Since the bug does not appear for standard cursors, a possible
workaround is to use plain crosshair cursor instead of beatiful .cur
cursors whenever "tip" precision is required (IMHO in digitizing and
in measure point precision is required).

For instance, this is how to have standard crosshair in digitizePoint
and measure

function SetMapCursor(strCursor) in file: ajaxmappane.templ

-    else
-    {
-			strCursor = "url('../stdicons/" + strCursor + ".cur'), pointer";
-    }

+    else
+    {
+		//https://code.google.com/p/chromium/issues/detail?id=145919
+		if (chrome && (strCursor == "digitizePoint" || strCursor == "measure"))
+			strCursor = "crosshair";
+		else
+			strCursor = "url('../stdicons/" + strCursor + ".cur'), pointer";
+    }

I've filed ticket 2105 (https://trac.osgeo.org/mapguide/ticket/2105)

Regards,

Gabriele Monfardini


More information about the mapguide-internals mailing list