[Mapbender-commits] r7472 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Jan 26 10:00:10 EST 2011
Author: kmq
Date: 2011-01-26 07:00:10 -0800 (Wed, 26 Jan 2011)
New Revision: 7472
Modified:
trunk/mapbender/http/javascripts/mod_savewmc.js
Log:
hack to attach eventhandler *after* afterInit
Modified: trunk/mapbender/http/javascripts/mod_savewmc.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_savewmc.js 2011-01-26 14:53:24 UTC (rev 7471)
+++ trunk/mapbender/http/javascripts/mod_savewmc.js 2011-01-26 15:00:10 UTC (rev 7472)
@@ -381,16 +381,19 @@
});
} else {
//alert("Your are in a browser compatibility mode - this make the application slow!");
- options.$target.each(function () {
- $(this).mapbender().events.afterMapRequest.register(function () {
- if (!window.resetSession) {
- that.save({
- session : true
- });
- //alert("no reset of session stored wmc requested - wmc will be saved into session!");
- }
+ // hack to attach the eventhandler after all initial wms have been added to the map
+ setTimeout(function(){
+ options.$target.each(function () {
+ $(this).mapbender().events.afterMapRequest.register(function () {
+ if (!window.resetSession) {
+ that.save({
+ session : true
+ });
+ //alert("no reset of session stored wmc requested - wmc will be saved into session!");
+ }
+ });
});
- });
+ },5000);
}
}
More information about the Mapbender_commits
mailing list