[Mapbender-commits] r6601 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Jul 13 10:50:51 EDT 2010


Author: kmq
Date: 2010-07-13 14:50:50 +0000 (Tue, 13 Jul 2010)
New Revision: 6601

Modified:
   trunk/mapbender/http/plugins/mb_loadkmlgeorss.js
Log:
update for IE

Modified: trunk/mapbender/http/plugins/mb_loadkmlgeorss.js
===================================================================
--- trunk/mapbender/http/plugins/mb_loadkmlgeorss.js	2010-07-13 14:50:15 UTC (rev 6600)
+++ trunk/mapbender/http/plugins/mb_loadkmlgeorss.js	2010-07-13 14:50:50 UTC (rev 6601)
@@ -137,14 +137,20 @@
 										"left": "0px",
 										"z-index": "80" },1);
 									g = geomArray.get(i);
-									g.e.setElement("Mapbender:icon","http://satan:8080/trunk/http/img/marker/red.png");
+									icon = g.e.getElementValueByName("Mapbender:icon");
 									title = g.e.getElementValueByName("title");
 									name = g.e.getElementValueByName("name");
 									if(typeof(name) == "string"){
 										title = name != "false" ? name : title;
+										if (icon == "false"){
+											g.e.setElement("Mapbender:icon","../img/marker/red.png");
+										}
 									}else{
 										//sane browsers go here
 										title = name != false ? name : title;
+										if (icon === false){
+											g.e.setElement("Mapbender:icon","../img/marker/red.png");
+										}
 									}
 			
 									description = g.e.getElementValueByName("description");
@@ -159,13 +165,6 @@
 									})(title,description));
 									$("tbody",$table).append($row);
 									h.add(g);
-									/*
-									h.setMouseClick((function(j){
-										return function(){
-											alert(j);
-										}
-									})(j));
-									*/
 									highlightArray.push(h);
 
 									title = "";
@@ -302,6 +301,19 @@
 				for(i in result.geometries){
 					var g = geomArray.get(i);
 					title = g.e.getElementValueByName("title");
+					name  = g.e.getElementValueByName("name");
+					if(typeof(name) == "string"){
+						title = name != "false" ? name : title;
+						if (icon == "false"){
+							g.e.setElement("Mapbender:icon","../img/marker/red.png");
+						}
+					}else{
+						//sane browsers go here
+						title = name != false ? name : title;
+						if (icon === false){
+							g.e.setElement("Mapbender:icon","../img/marker/red.png");
+						}
+					}
 					description = g.e.getElementValueByName("description");
 					$tabs.append('<li><a href="#rsspopup_'+ i +'">'+ title + '</a></li>');
 					that.$popup.append('<div id="rsspopup_'+ i +'"><h1>'+ title +'</h1><p>'+ description +'</p></h1>');



More information about the Mapbender_commits mailing list