[mapguide-internals] Problems with Ajax viewer and Firefox 14
Gabriele Monfardini
gabrimonfa at gmail.com
Fri Aug 31 01:39:00 PDT 2012
I've found a workaround for this problem.
Let's see function RequestMapImage (in viewerfiles/ajaxmappane.templ).
On map request, if we are on all browser except safari and chrome the
innerHtml of div#overlay is modified (on opera a hack is then used to
force redraw the content).
On safari and chrome we instead use a sort of double buffering,
loading images alternatively on two different <img> and toggling their
visibility.
This is used because otherwise the browser would show briefly, after a
pan, the image in the original position and then the moved one, which
is visually very annoying (it is easy to see that for example if
chrome is used and the "|| chrome" is removed in the IF clause).
My workaround is passing Firefox in the list of browser which adopt
the two images and swaps between them at each image change.
- if(safari || chrome)
- {
- LoadAlternateImage(url, reqId);
-}
+ if(safari || chrome || firefox)
+ {
+ LoadAlternateImage(url, reqId);
+}
This simple update seems to solve the issue, because swapping the
image force Firefox to redraw map content.
I'm going to open a bug, proposing this patch.
Comments are welcome, as usual.
Regards,
Gabriele Monfardini
More information about the mapguide-internals
mailing list