[Mapbender-commits] r5619 - in trunk/mapbender: http/javascripts http/plugins resources/db/pgsql/UTF-8/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Feb 24 05:58:55 EST 2010


Author: christoph
Date: 2010-02-24 05:58:54 -0500 (Wed, 24 Feb 2010)
New Revision: 5619

Modified:
   trunk/mapbender/http/javascripts/map_obj.js
   trunk/mapbender/http/plugins/mb_map.js
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql
Log:
deactivate slippy map by default

Modified: trunk/mapbender/http/javascripts/map_obj.js
===================================================================
--- trunk/mapbender/http/javascripts/map_obj.js	2010-02-24 10:18:33 UTC (rev 5618)
+++ trunk/mapbender/http/javascripts/map_obj.js	2010-02-24 10:58:54 UTC (rev 5619)
@@ -24,7 +24,9 @@
     var mapMsgObj;
 	var extentHasChanged = false;
 	var srsHasChanged = false;
-    
+
+	this.slippy = false;
+	
     eventLocalize.register(function(){
         localizeMap();
     });
@@ -1000,7 +1002,7 @@
 	        for (i = 0; i < idArray.length; i++) {
 	            var currentWms = that.wms[idArray[i]];
 /*
-				if (doAnimation && currentWms.gui_wms_visible === 2) {
+				if (that.slippy && currentWms.gui_wms_visible === 2) {
 					// request larger background image
 					var bgExtent = this.calculateExtentAfterZoom(false, 2.0, that.extent.center.x, that.extent.center.y);
 					var bgSwPix = that.convertRealToPixel(bgExtent.min);
@@ -1114,8 +1116,6 @@
 		});
 	};
 	
-	var doAnimation = true;
-	
 	this.moveMap = function (x, y) {
 		var newX = x;
 		var newY = y;
@@ -1146,7 +1146,7 @@
 		// show new map
 		// 
 		
-		if (doAnimation && extentHasChanged && !srsHasChanged) {
+		if (that.slippy && extentHasChanged && !srsHasChanged) {
 			var previousRequest = $("#" + that.elementName + "_request_" + (index-1));
 			var wasPanned = parseInt(previousRequest.css("top"), 10) !== 0 ||
 				parseInt(previousRequest.css("left"), 10) !== 0;

Modified: trunk/mapbender/http/plugins/mb_map.js
===================================================================
--- trunk/mapbender/http/plugins/mb_map.js	2010-02-24 10:18:33 UTC (rev 5618)
+++ trunk/mapbender/http/plugins/mb_map.js	2010-02-24 10:58:54 UTC (rev 5619)
@@ -23,6 +23,10 @@
  * > 'skipWmsIfSrsNotSupported', '0', 
  * > 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility',
  * > 'var');
+ * >
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
+ * > var_value, context, var_type) VALUES('<appId>', 'mapframe1', 'slippy', 
+ * > '0', 'Activates an animated, pseudo slippy map' ,'var');
  *
  * Help:
  * http://www.mapbender.org/Mapframe
@@ -69,6 +73,10 @@
 	// set restricted extent
 	mapObject.skipWmsIfSrsNotSupported = 
 		options.skipWmsIfSrsNotSupported === 1 ? true : false;
+
+	// pseudo slippy map
+	mapObject.slippy = 
+		options.slippy === 1 ? true : false;
 /*	
 	// set restricted extent
 	if (typeof options.restrictedExtent !== "undefined") {

Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql	2010-02-24 10:18:33 UTC (rev 5618)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql	2010-02-24 10:58:54 UTC (rev 5619)
@@ -1298,3 +1298,5 @@
 gui_element.fkey_gui_id
 NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE fkey_e_id = 'body' AND var_name = 'jq_datatables_css');
 
+-- deactivate slippy map by default
+INSERT INTO gui_element_vars (fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT DISTINCT fkey_gui_id, 'mapframe1' AS fkey_e_id, 'slippy' AS var_name, '0' AS var_value, '1 = Activates an animated, pseudo slippy map' AS context, 'var' AS var_type FROM gui_element WHERE e_id = 'mapframe1' AND fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'slippy');
\ No newline at end of file



More information about the Mapbender_commits mailing list