svn commit: r766 - trunk/mapbender/http/javascripts/mod_highlightPOI.php
astrid_emde at osgeo.org
astrid_emde at osgeo.org
Mon Sep 4 04:13:08 EDT 2006
Author: astrid_emde
Date: 2006-09-04 08:13:08+0000
New Revision: 766
Modified:
trunk/mapbender/http/javascripts/mod_highlightPOI.php
Log:
new element var poi_width and poi_height to define the width and height of the image which is displaed (poi_image)
Modified: trunk/mapbender/http/javascripts/mod_highlightPOI.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_highlightPOI.php?view=diff&rev=766&p1=trunk/mapbender/http/javascripts/mod_highlightPOI.php&p2=trunk/mapbender/http/javascripts/mod_highlightPOI.php&r1=765&r2=766
==============================================================================
--- trunk/mapbender/http/javascripts/mod_highlightPOI.php (original)
+++ trunk/mapbender/http/javascripts/mod_highlightPOI.php 2006-09-04 08:13:08+0000
@@ -55,6 +55,20 @@
}
try{
+ if (poi_width){}
+}
+catch(e){
+ poi_width = 20;
+}
+
+try{
+ if (poi_height){}
+}
+catch(e){
+ poi_height = 20;
+}
+
+try{
if (poi_style){}
}
catch(e){
@@ -125,15 +139,17 @@
function mod_highlightPOI_draw(){
var ind = getMapObjIndexByName(mod_highlightPOI_target);
- window.frames['mapframe1'].document.getElementById('highlight').style.width = mb_mapObj[ind].width;
- window.frames['mapframe1'].document.getElementById('highlight').style.height = mb_mapObj[ind].height;
- window.frames['mapframe1'].document.getElementById('highlight').style.top = 0;
- window.frames['mapframe1'].document.getElementById('highlight').style.left = 0;
+ window.frames[mod_highlightPOI_target].document.getElementById('highlight').style.width = mb_mapObj[ind].width;
+ window.frames[mod_highlightPOI_target].document.getElementById('highlight').style.height = mb_mapObj[ind].height;
+ window.frames[mod_highlightPOI_target].document.getElementById('highlight').style.top = 0;
+ window.frames[mod_highlightPOI_target].document.getElementById('highlight').style.left = 0;
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]);
- tagSource += "<div style='position:absolute;left:"+(pos[0]-7)+"px;top:"+(pos[1]-7)+"px'>";
- tagSource += "<img src='"+poi_image+"'><span style='"+poi_style+"'>"+mod_highlightPOI_params[i]+"<span></div>";
+ tagSource += "<div style='position:absolute;left:"+(pos[0]-poi_width)+"px;top:"+(pos[1]-poi_height)+"px'>";
+ tagSource += "<img src='"+poi_image+"'>";
+ tagSource += "<span style='"+poi_style+"'>"+mod_highlightPOI_params[i]+"<span>";
+ tagSource += "</div>";
}
writeTag(mod_highlightPOI_target, "highlight", tagSource);
}
More information about the Mapbender_commits
mailing list