I have been searching the list and found some ideas to add a reference map to the web layout. We made a first approach that can be seen in action <a href="http://213.195.75.242:8008/mapguide/viewertest/" target="_blank" rel="nofollow">here</a>. It is not intended to be stable or in its final form, so comments, ideas and criticism will be appreciated. We hope it would be helpful.<br />
This is a summary of the steps we followed to add it, :
<br />
 <ol>
<li>Copies of mapframe.php and ajaxmappane.templ were made (mapframeref.php and ajaxmappaneref.templ). In ajaxmappaneref.templ everything except the map image was hidden (legend, properties, slider, etc.) and a couple of functions were added:
<pre>
function drawMainMapExtent(X1,Y1,X2,Y2) {
        var p1,p2;
        p1 = MapToScreenUnits(X1,Y1);
        p2 = MapToScreenUnits(X2,Y2);
        
        return ShowMainMapExtent(p1.X,p1.Y,p2.X,p2.Y,true);
}
function ShowMainMapExtent(x1,y1,x2,y2,show) {
    var rcFrame = document.getElementById("rcFrame");
    if(show){
                        try {
                rcFrame.style.position = "absolute";
                rcFrame.style.left = (x1 + mapPosX) + "px";
                rcFrame.style.top = y1 + "px";
                rcFrame.style.width = (x2 - x1) + "px";
                rcFrame.style.height = (y2 - y1) + "px";
                rcFrame.style.visibility = "visible";
                rcFrame.zIndex = 20;
                return true;
            } catch (e) {
                    return false;
            }
    } else {
            rcFrame.style.visibility = "hidden";
            return true;
    }
}
</pre>
</li>
<li>A new frame was added in framesettaskbar.templ, in the top of the task area. mainframe.php was modified to receive a new parameter, the MapDefinition used in the reference map. When building the viewer, mainframe.php loads mapframeref.php in this frame, with the Map definition passed as parameter and false values for SHOWLEGEND, SHOWPROP, etc</li>
<li>In mainframe.templ a function was added to fire the extent drawing in the reference map:
<pre>
 function OnExtentChanged(X1,Y1,X2,Y2) {
          if (X1 && Y1 && X2 && Y2) refMap.drawMainMapExtent(X1,Y1,X2,Y2);
  }
</pre>
</li>
<li>Finally, in ajaxmappane.templ, on at the end of the OnMapRequested() function, we call OnExtentChanged()
<pre>
parent.OnExtentChanged(extX1, extY1, extX2, extY2);
</pre>
</li>
</ol>
<br><hr align="left" width="300">
View this message in context: <a href="http://www.nabble.com/Reference-Map-tf3589380s16610.html#a10031010">Reference Map</a><br>
Sent from the <a href="http://www.nabble.com/MapGuide-Users-f14845.html">MapGuide Users mailing list archive</a> at Nabble.com.<br>