[mapguide-trac] #1493: Resize window caused dynamic layers
disappear if the map with Base layers in Chrome/Safari
MapGuide Open Source
trac_mapguide at osgeo.org
Fri Oct 22 05:28:19 EDT 2010
#1493: Resize window caused dynamic layers disappear if the map with Base layers
in Chrome/Safari
---------------------------+------------------------------------------------
Reporter: yangte | Owner: yangte
Type: defect | Status: new
Priority: medium | Milestone: 2.3
Component: AJAX Viewer | Version: 2.2.0
Severity: major | Keywords: resize
External_id: 1356304 |
---------------------------+------------------------------------------------
Comment(by yangte):
When the map has base layer group, the ajaxviewer will hide the dynamic
map image div first.
{{{
function HideMapImage()
{
if(!HasVisibleBaseGroups())
return;
document.getElementById("img1").style.display = "none";
}
}}}
In the code for IE/Firefox, the Ajax viewer will unhide the map image div:
{{{
function OnMapOverlayImageLoaded(e)
{
...
var imgdiv = document.getElementById("img1");
...
{
img.src = overlayimg.src;
img.style.position = "absolute";
img.style.visibility = "visible";
img.style.width = mapDevW;
img.style.height = mapDevH;
img.style.left = 0;
img.style.top = 0;
}
imgdiv.style.display = "block";
...
}
}}}
However, in the code for !Chrome/Safari, someone forgot to unhide the map
image div:
{{{
function OnAlternateImageLoaded()
{
...
// Show the newly loaded image
img.style.position = "absolute";
img.style.visibility = "visible";
img.style.width = mapDevW;
img.style.height = mapDevH;
img.style.left = 0;
img.style.top = 0;
...
}
}}}
so the solution is to simply unhide the div.
--
Ticket URL: <https://trac.osgeo.org/mapguide/ticket/1493#comment:1>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list