DHTMLX Docs & Samples Explorer

Attach Maps to Layout

Source
<link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxlayout.css">
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxlayout_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxlayout.js"></script>
<script src="../../codebase/dhtmlxcontainer.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
 
<div id="parentId" style="position: relative; top: 20px; left: 20px; width: 600px; height: 400px; aborder: #B5CDE4 1px solid;"></div>
<script>
var dhxLayout,
GMaps;
function doOnLoad() {
    dhxLayout = new dhtmlXLayoutObject("parentId", "2U");
    dhxLayout.cells("a").setWidth(120);
    GMaps = dhxLayout.cells("b").attachMap();
    dhxLayout.attachEvent("onPanelResizeFinish", function() {
        // notify GMaps that parent dimension was changed;
        google.maps.event.trigger(GMaps, "resize");
    });
}
</script>