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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Feb 15 06:04:27 EST 2011


Author: kmq
Date: 2011-02-15 03:04:27 -0800 (Tue, 15 Feb 2011)
New Revision: 7607

Modified:
   trunk/mapbender/http/plugins/mb_resultList_Highlight.js
Log:
add an onclick highlight to resultList

Modified: trunk/mapbender/http/plugins/mb_resultList_Highlight.js
===================================================================
--- trunk/mapbender/http/plugins/mb_resultList_Highlight.js	2011-02-15 10:01:29 UTC (rev 7606)
+++ trunk/mapbender/http/plugins/mb_resultList_Highlight.js	2011-02-15 11:04:27 UTC (rev 7607)
@@ -51,6 +51,26 @@
 options.resultHighlightZIndex  = options.resultHighlightZIndex || 100;
 
 Mapbender.events.init.register(function(){
+	var standingHighlight = null;
+	Mapbender.modules[options.target[0]].rowclick.register(function(row){
+		var me = Mapbender.modules[options.target[0]];
+		var modelIndex = $(row).data("modelindex");
+		var feature = me.model.getFeature(modelIndex);
+
+		
+		if(standingHighlight !== null){ standingHighlight.clean();}
+		standingHighlight = new Highlight(
+				[options.target[1],options.target[2]],
+				"standingHighlight", 
+				{"position":"absolute", "top":"0px", "left":"0px", "z-index":options.resultHighlightZIndex}, 
+				options.resultHighlightLineWidth);
+		standingHighlight.add(feature, options.resultHighlightColor);
+		Mapbender.events.afterMapRequest.register( function(){
+			standingHighlight.paint();
+		});
+
+	});
+
 	Mapbender.modules[options.target[0]].rowmouseover.register(function(row){
 		var me = Mapbender.modules[options.target[0]];
 		var modelIndex = $(row).data("modelindex");
@@ -89,4 +109,3 @@
 		me.resultHighlight.paint();
 	});
 });
-



More information about the Mapbender_commits mailing list