svn commit: r967 - trunk/mapbender/http/javascripts/mod_resize_mapsize.php

marko at osgeo.org marko at osgeo.org
Thu Nov 30 14:29:45 EST 2006


Author: marko
Date: 2006-11-30 19:29:45+0000
New Revision: 967

Modified:
   trunk/mapbender/http/javascripts/mod_resize_mapsize.php

Log:
-no holding the position, no zoom zo full extent anymore
-not tested with mod_setPOI2Scale.php (perhaps on tomorrow)
code cleaning


Modified: trunk/mapbender/http/javascripts/mod_resize_mapsize.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_resize_mapsize.php?view=diff&rev=967&p1=trunk/mapbender/http/javascripts/mod_resize_mapsize.php&p2=trunk/mapbender/http/javascripts/mod_resize_mapsize.php&r1=966&r2=967
==============================================================================
--- trunk/mapbender/http/javascripts/mod_resize_mapsize.php	(original)
+++ trunk/mapbender/http/javascripts/mod_resize_mapsize.php	2006-11-30 19:29:45+0000
@@ -92,35 +92,19 @@
 }
 
 function adjustDimension(){
-	var ind = getMapObjIndexByName(map_frame);
+	var ind = getMapObjIndexByName("<?php  echo $e_target;  ?>");
 	var mapheight = frameHeight() - <?php echo $e_top ?> + parseInt(adjust_height);
 	var mapwidth = frameWidth() - map_frame_left - legend_width + parseInt(adjust_width) ;
-	var pos = makeClickPos2RealWorldPos(map_frame,mapwidth,mapheight);
 	var coords = mb_mapObj[ind].extent.split(",");
-
-	mb_mapObj[ind].extent = coords[0] + "," + pos[1] + "," + pos[0] + "," + coords[3];
+	midcoordx=parseFloat((parseFloat(coords[2])-parseFloat(coords[0]))/2)+parseFloat(coords[0]);
+	midcoordy=parseFloat((parseFloat(coords[3])-parseFloat(coords[1]))/2)+parseFloat(coords[1]);
 	mb_mapObj[ind].width = mapwidth;
 	mb_mapObj[ind].height = mapheight;
 	document.getElementById(map_frame).style.width = mb_mapObj[ind].width;
 	document.getElementById(map_frame).style.height = mb_mapObj[ind].height;
 	window.frames[map_frame].document.getElementById("maps").style.width = mb_mapObj[ind].width;
 	window.frames[map_frame].document.getElementById("maps").style.height = mb_mapObj[ind].height;
-	zoomFull();
-}
-
-function zoomFull(){
-    var ind         = this.getMapObjIndexByName("<?php  echo $e_target;  ?>");
-	var arrayThemen = new Array();
-	var arrayThemen = mb_mapObj[ind].wms[0].objLayer[0].layer_name;
-	this.Layer0     = arrayThemen;
-	this.width      = mb_mapObj[ind].width;
-	this.height     = mb_mapObj[ind].height;
-    this.epsg       = wms[0].gui_wms_epsg;
-	var arrayExt = new Array();
-	var frameName = "<?php  echo $e_target;  ?>"
-	var exts = setExtent(width,height,epsg);
-	arrayExt = exts.split(",");
-	mb_repaint(frameName,arrayExt[0],arrayExt[1],arrayExt[2],arrayExt[3]);
+	mb_repaintScale("<?php  echo $e_target;  ?>",midcoordx,midcoordy,mb_getScale("<?php  echo $e_target;  ?>"));
 }
 
 function rebuild() {




More information about the Mapbender_commits mailing list