svn commit: r822 - trunk/mapbender/http/javascripts/mod_permanentHighlight.js
astrid_emde at osgeo.org
astrid_emde at osgeo.org
Thu Nov 16 10:27:54 EST 2006
Author: astrid_emde
Date: 2006-11-16 15:27:54+0000
New Revision: 822
Modified:
trunk/mapbender/http/javascripts/mod_permanentHighlight.js
Log:
extended functionality: permanent highlight with permanent text is possible
Modified: trunk/mapbender/http/javascripts/mod_permanentHighlight.js
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_permanentHighlight.js?view=diff&rev=822&p1=trunk/mapbender/http/javascripts/mod_permanentHighlight.js&p2=trunk/mapbender/http/javascripts/mod_permanentHighlight.js&r1=821&r2=822
==============================================================================
--- trunk/mapbender/http/javascripts/mod_permanentHighlight.js (original)
+++ trunk/mapbender/http/javascripts/mod_permanentHighlight.js 2006-11-16 15:27:54+0000
@@ -1,9 +1,11 @@
var mod_permanentHighlight_target = "mapframe1";
var mod_permanentHighlight_x = false;
var mod_permanentHighlight_y = false;
+var mod_permanentHighlight_text = false;
mb_registerSubFunctions("mod_permanentHighlight_init()");
mb_registerPanSubElement("permanent");
+
function mod_permanentHighlight_init(){
if(mod_permanentHighlight_x && mod_permanentHighlight_y){
mb_permanentHighlight("mapframe1",parseFloat(mod_permanentHighlight_x),parseFloat(mod_permanentHighlight_y));
@@ -11,5 +13,16 @@
}
function mb_permanentHighlight(frameName,x,y){
var pos = makeRealWorld2mapPos(frameName,x, y);
- mb_arrangeElement(frameName,"permanent",pos[0]-7, pos[1]-7);
-}
\ No newline at end of file
+ window.frames[frameName].document.getElementById('permanent').style.visibility = 'visible';
+ //3373790 / 5938930
+ if (mod_permanentHighlight_text){
+ var tagSource = "";
+ tagSource += "<div style='position:absolute;left:"+(pos[0]-7)+"px;top:"+(pos[1]-7)+"px'>";
+ tagSource += "<img src='../img/redball.gif'>";
+ tagSource += "<span style='position:absolute;top:+12px;left:+12px;z-index:20;visibility:visible;background-color:white;color:red;font-family:Arial;'><nobr>";
+ tagSource += mod_permanentHighlight_text +"</nobr><span></div>";
+ writeTag(frameName, "permanent", tagSource);
+ }else{
+ mb_arrangeElement(frameName,"permanent",pos[0]-7, pos[1]-7);
+ }
+}
More information about the Mapbender_commits
mailing list