Opened 16 years ago
Closed 15 years ago
#612 closed defect (fixed)
Opera 9.50 doesn't load map using the Basic Viewer
Reported by: | zspitzer | Owned by: | |
---|---|---|---|
Priority: | medium | Milestone: | |
Component: | AJAX Viewer | Version: | 2.0.1 |
Severity: | critical | Keywords: | |
Cc: | External ID: |
Description
Using mgos 2.01 (and the FF 3 patches) and I can reproduce the problem it using the basic viewer on Opera, there is no error reported in the Opera Console
testing with fiddler, the last successful request is
OPERATION=GETVISIBLEMAPEXTENT&VERSION=1.0.0&SESSION=ed3b85bc-ffff-ffff-8000-00163e654f42_en_7F0000010AFC0AFB0AFA&MAPNAME=Sheboygan&SEQ=0.1061965599656105&SETDISPLAYDPI=96&SETDISPLAYWIDTH=1223&SETDISPLAYHEIGHT=793&SETVIEWSCALE=56304.15451497935&SETVIEWCENTERX=-87.7302542509315&SETVIEWCENTERY=43.744459064634&CLIENTAGENT=Ajax%20Viewer
which returns some xml bounds
the next request (which never is made by opera) using Firefox is
GET /mapguide/mapagent/mapagent.fcgi?OPERATION=GETDYNAMICMAPOVERLAYIMAGE&FORMAT=PNG&VERSION=1.0.0&SESSION=bcfbe93c-ffff-ffff-8000-00163e654f42_en_7F0000010AFC0AFB0AFA&MAPNAME=Sheboygan&SEQ=0.34199134868538994&CLIENTAGENT=Ajax%20Viewer
Attachments (1)
Change History (9)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
I think the problem is somewhere in between the functions RequestMapImage(reqId) & OnMapOverlayImageLoaded(e) in line 1672 and 1686 in ajaxmappane.templ
The url is being set correctly in RequestMapImage but the onload event function OnMapOverlayImageLoaded is never being called coz opera is pickly and doesn't fire onload events for images like other browsers.
adding the following to the end of the function RequestMapImage get things working..
if (opera) document.getElementById("mapImage").src=document.getElementById("mapImage").src;
browserdetect.js needs to be taught about Opera
var opera = agent.indexOf("opera") != -1;
by , 16 years ago
Attachment: | opera_basic_viewer_fix.patch added |
---|
Workaround for image onload bug with Opera
comment:3 by , 16 years ago
Hi Zac, can you explain to me why adding that line works? Is that a well-known documented trick? Any references to this fix? Thanks, Tom
comment:4 by , 16 years ago
Oh, I'm referring to this line: "document.getElementById("mapImage").src=document.getElementById("mapImage").src;"
comment:5 by , 16 years ago
it might be this...
"Trigger an onload event for images set to display:none"
found here http://snapshot.opera.com/windows/w950a1.html
anyway, there's a lot out there
http://www.google.com.au/search?q=opera+dom+image+loading+bug
comment:6 by , 16 years ago
Thanks Zac, I looked through those links and found this one: http://www.thefutureoftheweb.com/blog/image-onload-isnt-being-called
I think that it backs up the solution you propose. Since this change is innocuous to other browsers, I'll check it in. Tom
comment:7 by , 16 years ago
Patch submitted with http://trac.osgeo.org/mapguide/changeset/3248. Note that I am not closing the ticket because of a remaining problem that I noticed (and am hoping that someone else may fix):
One thing that I noticed that doesn't work is that the "Tasks" button at the top of the tasks pane. When I try to select Query or something like that it doesn't switch to that in the task page. However, the task pane itself does seem to work as I was able to get buffer to work.
comment:8 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I'm going to close this as there has been no additional movement. If it's still a problem with latest Fusion, maybe open a new ticket with only the new problem?
I'd love to see this working because then I might be able to browse to MapGuide sites on my WII! :)
I searched for the string GETVISIBLEMAPEXTENT and found it in WebServerExtensions/www/viewerfiles/ajaxmappane.templ in the RequestMap function. If you're up for it, try putting some alert statements in there and see where the script is failing. If I have it right, RequestMap (which does GETVISIBLEMAPEXTENT)calls OnMapRequested which then calls RequestMapImage (which does the missing GETDYNAMICOVERLAYIMAGE operation). So somewhere in there, things are failing in Opera.