[Mapbender-commits] r4138 - branches/2.6/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Jun 24 13:21:06 EDT 2009
Author: verenadiewald
Date: 2009-06-24 13:21:06 -0400 (Wed, 24 Jun 2009)
New Revision: 4138
Modified:
branches/2.6/http/javascripts/mod_usemap.php
Log:
http://trac.osgeo.org/mapbender/ticket/483
Modified: branches/2.6/http/javascripts/mod_usemap.php
===================================================================
--- branches/2.6/http/javascripts/mod_usemap.php 2009-06-24 17:18:45 UTC (rev 4137)
+++ branches/2.6/http/javascripts/mod_usemap.php 2009-06-24 17:21:06 UTC (rev 4138)
@@ -1,7 +1,7 @@
<?php
# $Id$
# http://www.mapbender.org/index.php/UseMap
-# Copyright (C) 2002 CCGIS
+# Copyright (C) 2002 CCGIS
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
var um_draw;
mb_registerSubFunctions('mod_usemap_init()');
-mb_registerInitFunctions("um_init()")
+mb_registerInitFunctions("um_init()");
function mod_usemap_init(){
var ind = getMapObjIndexByName(mod_usemap_target);
@@ -37,7 +37,8 @@
url += "&gui_id=<?php echo $gui_id;?>";
url += "&e_id=<?php echo $e_id;?>";
document.getElementById('usemap').src = url;
- var myImg = window.frames[mod_usemap_target].document.getElementById("um_img").style;
+ var myImg = document.getElementById("um_img").style;
+ myImg.zIndex = "10000";
myImg.width = mb_mapObj[ind].width;
myImg.height = mb_mapObj[ind].height;
}
@@ -45,12 +46,12 @@
var str = "";
for(var i=0; i<title.length; i++){
var pos = makeRealWorld2mapPos(mod_usemap_target,x[i],y[i]);
- str += "<AREA onmouseover='parent.over(event, \"" + title[i] + "\", this)' ";
+ str += "<AREA onmouseover='parent.over(event, \"" + title[i] + "\", this)' ";
str += "onmouseout=parent.out(this) shape='circle' coords='";
str += Math.round(pos[0]) + "," + Math.round(pos[1]) + "," + mod_usemap_px + "'";
str += " href='#'>";
- }
- writeTag(mod_usemap_target, 'um', str);
+ }
+ writeTag('', 'um', str);
}
/* Opacity for hilighting */
@@ -64,7 +65,7 @@
var Xcoords = '';
for (var z = 0; z<coords.length; z=z+2){
if (z > 0){
- Xcoords += ', ';
+ Xcoords += ', ';
}
Xcoords += parseInt(coords[z]);
}
@@ -106,9 +107,9 @@
canvas.paint();
canvas.setColor(cw_bndcolor);
canvas.drawEllipse(parseInt(c[0])-mod_usemap_px/2,parseInt(c[1])-mod_usemap_px/2,parseInt(c[2]),parseInt(c[2]));
- canvas.paint();
+ canvas.paint();
}
- canvasHasDrawing = true;
+ canvasHasDrawing = true;
return true;
}
@@ -127,7 +128,7 @@
isOver = area;
setFocus(area);
}
- mb_arrangeElement(mod_usemap_target, 'um_title', parseInt(coords[0])+mod_usemap_px, parseInt(coords[1])+mod_usemap_px);
+ mb_arrangeElement('', 'um_title', parseInt(coords[0])+mod_usemap_px, parseInt(coords[1])+mod_usemap_px);
canvasHasDrawing = true;
}
@@ -140,9 +141,10 @@
}
function um_init(){
- um_title = window.frames[mod_usemap_target].document.getElementById("um_title"); /* tooltip */
- um_draw = window.frames[mod_usemap_target].document.getElementById("um_draw"); /* tooltip */
- canvas = new jsGraphics('um_draw', window.frames['mapframe1']);
+ um_title = document.getElementById("um_title"); /* tooltip */
+ um_draw = document.getElementById("um_draw"); /* tooltip */
+ var mapObjInd = getMapObjIndexByName(mod_usemap_target);
+ canvas = new jsGraphics('um_draw', mb_mapObj[mapObjInd].getDomElement().frameName ? window.frames[mapframe] : window);
canvas.setStroke(2);
canvasHasDrawing = false;
isOver = false;
More information about the Mapbender_commits
mailing list