[mapguide-users] patch for Mouse WheelZoom, set scale and image on loading map in Ajax

Ivan Milicevic ivan.milicevic at supranet.hr
Mon May 7 04:35:52 EDT 2007


This is very nice! Thanks a lot!

 

From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of web
Sent: Monday, May 07, 2007 9:18 AM
To: MapGuide Users Mail List
Subject: [mapguide-users] patch for Mouse WheelZoom,set scale and image on loading map in Ajax

 

Hi all,
just wanted to add somethig to the discussion of Mon Apr 2 17:49:22 EDT 2007.

Reference: http://lists.osgeo.org/pipermail/mapguide-internals/2007-April/001122.html

Display the rotating icon sounds good when the page is loading. I've added an effect which blurs the map (with a transparent div) when loading. With the rotating arrow, this is a nice effect.

All you have to do is opening the [ajaxmappane.templ]

About line 3047:

<div>
            <div id="mapSpace">
                <div id="tilePlanes">
                </div>
                <div id="img1" style="overflow: hidden;">
                    <img class="mapImage" id="mapImage1" style="visibility: hidden;" >
                    <img class="mapImage" id="mapImage2" style="visibility: hidden;" >
                </div>
             <!-- Setting a transparent div to display when the page is loading, with the logo rotating -->          
                <div id="maskTransp" style="display:none; background-color:#FFFFFF; position:absolute; width:100%%; top:0; left:0; height:100%%; filter:alpha(opacity=60); -moz-opacity:0.6; opacity: 0.6; z-index: 1;" ></div>
            </div>
            <div id="overlay" style="display:none; visibility: hidden; position: absolute; top: 0px; left: 0px;"></div>
          </div>


then, about line 1360:

else
        {   
            var frmParent = parent.frames ["tbFrame"];
            var objDivRefresh = frmParent.document.getElementById("divRefresh");
            var objDivTransparent = document.getElementById("maskTransp");
            
            if(objDivRefresh!=null){  objDivRefresh.style.display='block'; }
            if(objDivTransparent!=null){  objDivTransparent.style.display='block'; }
            panX1 = extX1 = resp.lowerLeft.X;
            panY1 = extY1 = resp.upperRight.Y;
            panX2 = extX2 = resp.upperRight.X;


and about line

imgdiv.style.display = "block";
    if(safari)
        curimg = (curimg == "mapImage1"? "mapImage2": "mapImage1");
    var frmParent = parent.frames ["tbFrame"];
    var objDivRefresh = frmParent.document.getElementById("divRefresh");
    var objDivTransparent = document.getElementById("maskTransp");
    if(objDivRefresh!=null){    objDivRefresh.style.display='none'; }
    if(objDivTransparent!=null){    objDivTransparent.style.display='none'; }
    return false;
}
function OnAlternateImageLoaded() {




For the rotating arrow, do not forget, if it is not done, to:
Set the div in toolbar.templ

about line 232

<body class="Toolbar" onload="InitDocument()" leftmargin=10 topmargin=0 rightmargin=0 bottommargin=0 marginwidth=0>
    <div id="divRefresh" name="divRefresh" class="cssRefresh"><img src="../phpviewersample/images/spinner_notext.gif"><img src="../phpviewersample/images/text_spinner.gif"></div>
    <span id="ToolbarContent"><td></td></span>
    <div class="TextMetricsDiv" id="TextMetricsDiv"><span class="TextMetrics" id="Metrics"></span></div>


and in the css section:

div.cssRefresh
        {
            position: absolute; 
            right:0px;
            top:0px;   
    
        }


Rémy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070507/e1fe5430/attachment.html


More information about the mapguide-users mailing list