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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Jan 2 06:45:14 EST 2009


Author: christoph
Date: 2009-01-02 06:45:14 -0500 (Fri, 02 Jan 2009)
New Revision: 3384

Modified:
   trunk/mapbender/http/javascripts/mod_copyright.php
   trunk/mapbender/http/javascripts/mod_dragMapSize.php
   trunk/mapbender/http/javascripts/mod_highlightPOI.php
Log:
http://trac.osgeo.org/mapbender/ticket/360

Modified: trunk/mapbender/http/javascripts/mod_copyright.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_copyright.php	2009-01-02 11:07:45 UTC (rev 3383)
+++ trunk/mapbender/http/javascripts/mod_copyright.php	2009-01-02 11:45:14 UTC (rev 3384)
@@ -41,11 +41,31 @@
 });
 function mod_copyright(){
 	var ind = getMapObjIndexByName(mod_copyright_target);
+	var myMapObj = mb_mapObj[ind];
+
 	var str_c = "<div>";
 	str_c += "<img src='../img/transparent.gif' width ='"+mb_mapObj[ind].width+"' height='"+mb_mapObj[ind].height+"'>";
 	str_c += "<div style='font-family:"+mod_copyright_font+";font-size:"+mod_copyright_fontsize+";color:"+mod_copyright_color1+";position:absolute;top:"+(mb_mapObj[ind].height - (mod_copyright_bottom-1))+"px;left:"+mod_copyright_left+"px'>"+mod_copyright_text+"</div>";
 	str_c += "<div style='font-family:"+mod_copyright_font+";font-size:"+mod_copyright_fontsize+";color:"+mod_copyright_color1+";position:absolute;top:"+(mb_mapObj[ind].height - mod_copyright_bottom)+"px;left:"+mod_copyright_left+"px'>"+mod_copyright_text+"</div>";
 	str_c += "<div style='font-family:"+mod_copyright_font+";font-size:"+mod_copyright_fontsize+";color:"+mod_copyright_color2+";position:absolute;top:"+(mb_mapObj[ind].height - mod_copyright_bottom)+"px;left:"+(mod_copyright_left+1)+"px'>"+mod_copyright_text+"</div>";
 	str_c += "</div>";
-	writeTag(mod_copyright_target,"copyright",str_c); 
+
+	var map_el = myMapObj.getDomElement();
+	if(!map_el.ownerDocument.getElementById(myMapObj.elementName+"_copyright")){
+		//create Box Elements
+		el_top = map_el.ownerDocument.createElement("div");
+		el_top.style.position = "absolute";
+		el_top.style.top = "0px";
+		el_top.style.left = "0px";
+		el_top.style.width = "0px";
+		el_top.style.height = "0px";
+		el_top.style.overflow = "hidden";
+		el_top.style.zIndex = "10";
+		el_top.style.visibility = "hidden";
+		el_top.style.cursor = "crosshair";
+		el_top.style.backgroundColor = "#ff0000";
+		el_top.id = myMapObj.elementName+"_copyright";
+		map_el.appendChild(el_top);
+	}
+	writeTag(myMapObj.frameName, myMapObj.elementName+"_copyright", str_c);
 }

Modified: trunk/mapbender/http/javascripts/mod_dragMapSize.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_dragMapSize.php	2009-01-02 11:07:45 UTC (rev 3383)
+++ trunk/mapbender/http/javascripts/mod_dragMapSize.php	2009-01-02 11:45:14 UTC (rev 3384)
@@ -94,8 +94,8 @@
 		mb_arrangeElement('', "dragMapSize", dif_x, dif_y);
 		return;
 	}
-	var newX = (parseFloat(mb_mapObj[ind].width) + parseFloat(dif_x));
-	var newY = (parseFloat(mb_mapObj[ind].height) + parseFloat(dif_y));
+	var newX = (parseFloat(targetObject.width) + parseFloat(dif_x));
+	var newY = (parseFloat(targetObject.height) + parseFloat(dif_y));
 	var pos =  makeClickPos2RealWorldPos(mod_dragMapSize_target, newX, newY);
 	targetObject.setWidth(targetObject.getWidth() + parseFloat(dif_x));
 	targetObject.setHeight(targetObject.getHeight() + parseFloat(dif_y));

Modified: trunk/mapbender/http/javascripts/mod_highlightPOI.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_highlightPOI.php	2009-01-02 11:07:45 UTC (rev 3383)
+++ trunk/mapbender/http/javascripts/mod_highlightPOI.php	2009-01-02 11:45:14 UTC (rev 3384)
@@ -126,7 +126,14 @@
 function mod_highlightPOI_draw(){
   var ind = getMapObjIndexByName(mod_highlightPOI_target);
   var div = new DivTag(mod_highlightPOI_target+'permanent', mb_mapObj[ind].frameName, 
-  	"position:absolute;width:"+mb_mapObj[ind].width+";height:"+mb_mapObj[ind].height+";top:0;left:0;visibility:visible");
+  	{
+		"position":"absolute",
+		"width":mb_mapObj[ind].width+"px",
+		"height":mb_mapObj[ind].height+"px",
+		"top":0,
+		"left":0,
+		"visibility":"visible"
+	});
   var tagSource = "";
   for(var i=0; i<mod_highlightPOI_params.length; i=i+3){
     var pos = makeRealWorld2mapPos(mod_highlightPOI_target,mod_highlightPOI_params[i+1], mod_highlightPOI_params[i+2]);



More information about the Mapbender_commits mailing list