[Mapbender-commits] r5808 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Mar 18 11:48:56 EDT 2010
Author: verenadiewald
Date: 2010-03-18 11:48:54 -0400 (Thu, 18 Mar 2010)
New Revision: 5808
Modified:
trunk/mapbender/http/plugins/mb_initWmc.php
Log:
changed some events
Modified: trunk/mapbender/http/plugins/mb_initWmc.php
===================================================================
--- trunk/mapbender/http/plugins/mb_initWmc.php 2010-03-17 15:29:40 UTC (rev 5807)
+++ trunk/mapbender/http/plugins/mb_initWmc.php 2010-03-18 15:48:54 UTC (rev 5808)
@@ -48,37 +48,38 @@
done: new Mapbender.Event()
};
this.init = function () {
- <?php
- function initWmcById ($wmcId,$wmcAction) {
- $wmc = new wmc();
-
- $wmc->createFromDb($wmcId);
-
- $updatedWMC = $wmc->updateUrlsFromDb();
- $wmc->createFromXml($updatedWMC);
-
- $jsArray = $wmc->toJavaScript();
-
- if ($jsArray) {
- $jsString = implode("", $jsArray);
- echo $jsString;
+ Mapbender.events.beforeInit.register(function () {
+ <?php
+ function initWmcById ($wmcId,$wmcAction) {
+ $wmc = new wmc();
+
+ $wmc->createFromDb($wmcId);
+
+ $updatedWMC = $wmc->updateUrlsFromDb();
+ $wmc->createFromXml($updatedWMC);
+
+ $jsArray = $wmc->toJavaScript();
+
+ if ($jsArray) {
+ $jsString = implode("", $jsArray);
+ echo $jsString;
+ }
+ else {
+ $e = new mb_exception("WMC could not be loaded.");
+ }
}
- else {
- $e = new mb_exception("WMC could not be loaded.");
+ if($wmcId != "") {
+ initWmcById($wmcId,$wmcAction);
}
- }
- if($wmcId != "") {
- initWmcById($wmcId,$wmcAction);
- }
- ?>
- Mapbender.events.init.register(function () {
+ ?>
that.events.done.trigger({
- id: parseInt("<?php echo $wmcId;?>", 10)
+ id: parseInt("<?php echo $wmcId;?>", 10),
+ extensionData: restoredWmcExtensionData
});
});
};
- Mapbender.events.beforeInit.register(function () {
+ Mapbender.events.initMaps.register(function () {
that.init();
});
};
More information about the Mapbender_commits
mailing list