Index: htdocs/keymap.php =================================================================== RCS file: /cvs/maptools/cvsroot/ka-map/htdocs/keymap.php,v retrieving revision 1.5 diff -u -r1.5 keymap.php --- htdocs/keymap.php 9 Sep 2005 14:16:45 -0000 1.5 +++ htdocs/keymap.php 23 Sep 2005 12:54:10 -0000 @@ -32,6 +32,9 @@ $webDir = $oMap->web->imagepath; $webURL = $oMap->web->imageurl; +if (substr ($webURL, strlen ($webURL) - 1) == "/") + $webURL = substr ($webURL, 0, strlen ($webURL) - 1); + $ext = array_pop(explode('.', $img)); $filename = basename($img, '.'.$ext); $tmpName = md5($img).".".$ext; Index: htdocs/kaKeymap.js =================================================================== RCS file: /cvs/maptools/cvsroot/ka-map/htdocs/kaKeymap.js,v retrieving revision 1.8 diff -u -r1.8 kaKeymap.js --- htdocs/kaKeymap.js 14 Sep 2005 12:55:41 -0000 1.8 +++ htdocs/kaKeymap.js 23 Sep 2005 13:13:21 -0000 @@ -84,6 +84,10 @@ this.cellWidth = (this.aExtents[2] - this.aExtents[0]) / this.imgWidth; this.cellHeight = (this.aExtents[3] - this.aExtents[1]) / this.imgHeight; + //clear old keymap + for(var i = this.domObj.childNodes.length - 1; i >= 0; i--) + this.domObj.removeChild (this.domObj.childNodes[i]); + //create an image to hold the keymap this.domImg = document.createElement( 'img' ); this.domImg.src = this.imgSrc;