[Mapbender-commits] r5292 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jan 6 09:46:40 EST 2010


Author: christoph
Date: 2010-01-06 09:46:40 -0500 (Wed, 06 Jan 2010)
New Revision: 5292

Modified:
   trunk/mapbender/http/javascripts/map.php
   trunk/mapbender/http/javascripts/mapnf.php
Log:


Modified: trunk/mapbender/http/javascripts/map.php
===================================================================
--- trunk/mapbender/http/javascripts/map.php	2010-01-06 14:45:13 UTC (rev 5291)
+++ trunk/mapbender/http/javascripts/map.php	2010-01-06 14:46:40 UTC (rev 5292)
@@ -221,7 +221,8 @@
 	echo "var t = Mapbender.modules." . $e_id . ".target;";
 	echo "var sel = [];for (var k in t) {sel.push('#' + t[k])}\n";
 	echo "Mapbender.modules." . $e_id . ".\$target = \$(sel.join(', '));\n";
-
+	echo "$('#" . $e_id . "').data('api', Mapbender.modules." . $e_id . ");";
+	
 	//
 	// Include JavaScript files
 	//
@@ -279,4 +280,4 @@
 echo "\nfunction initModules () {\n";
 echo implode("\n", $executeJsPluginsArray);
 echo "}\n";
-?>
+?>
\ No newline at end of file

Modified: trunk/mapbender/http/javascripts/mapnf.php
===================================================================
--- trunk/mapbender/http/javascripts/mapnf.php	2010-01-06 14:45:13 UTC (rev 5291)
+++ trunk/mapbender/http/javascripts/mapnf.php	2010-01-06 14:46:40 UTC (rev 5292)
@@ -22,9 +22,12 @@
 
 eventInitMap.register(function () {
 	
+	$this.data("isMap", true);
+	
 //	$this.html('<div id="'+options.id+'_maps" name="maps" style ="position: absolute; left: 0px; top: 0px; width: 0px; height: 0px; z-index:2;"></div>');
 	$this.html('<div id="'+options.id+'_maps" name="maps" style ="width: 0px; height: 0px; z-index:2;"></div>');
 
+/*
 	Mapbender.modules[options.id] = $.extend(new Mapbender.Map (
 		'', 
 		options.id, 
@@ -32,6 +35,15 @@
 		options.height, 
 		null
 	), Mapbender.modules[options.id]);
+*/
+
+	$this.mapbender(new Mapbender.Map (
+		'', 
+		options.id, 
+		options.width, 
+		options.height, 
+		null
+	));
 	mb_mapObj.push(Mapbender.modules[options.id]);
 	var mapObject = Mapbender.modules[options.id];
 



More information about the Mapbender_commits mailing list