createFromApplication($_SESSION["mb_user_gui"]); $_SESSION["mb_wmc"] = $wmc->toXml(); $e = new mb_notice("creating initial WMC."); } else { if (!$wmc->createFromXml($_SESSION['mb_wmc'])) { $jsString .= "var e = new Mb_notice('mod_loadwmc: load_wmc_session: error parsing wmc');"; } } $wmsTitleJs = ""; $wmsTitleArray = array(); if ($mergeWms) { $e = new mb_notice("merging with WMS."); $wmsArray = array(); for ($i = 0; $i < count($_SESSION["wms"]); $i++) { $currentWms = new wms(); $currentWms->createObjFromXML($_SESSION["wms"][$i]); array_push($wmsArray, $currentWms); $wmsTitleArray[]= "" . $currentWms->wms_title . ""; } $options = array(); if (isset($_SESSION["addwms_showWMS"])) { $options["show"] = $_SESSION["addwms_showWMS"]; } if (isset($_SESSION["addwms_zoomToExtent"])) { $options["zoom"] = $_SESSION["addwms_zoomToExtent"]; } if (count($options) > 0) { $wmc->mergeWmsArray($wmsArray, $options); } else { $wmc->mergeWmsArray($wmsArray); } if (count($_SESSION["wms"] > 0)) { $wmsTitleHtml = implode("
", $wmsTitleArray); $wmsTitleJs .= <<
" + "$wmsTitleHtml", modal: false, effectShow: 'puff' }); } catch (e) { new Mb_warning(e.message); }; JS; $wmsTitleJs .= "try{tab_open('treeGDE');}catch(exc){new Mb_warning(exc.message)}"; } $_SESSION["command"] = ""; $_SESSION["wms"] = array(); unset($_SESSION["addwms_showWMS"]); unset($_SESSION["addwms_zoomToExtent"]); } $javaScriptArray = array(); $javaScriptArray = $wmc->toJavaScript(); $javaScriptArray[]= $wmsTitleJs; $jsString .= implode("", $javaScriptArray); return $jsString; } // // Creates the function load_wmc_session. // This function loads a WMC from the session, if the element var // "loadFromSession" is set to true. // ?> function load_wmc_session() { }