 		 * This function will get all the unique keys that overlap each geometry specified by
 		 * simpleGeometries. 
 		 * @param simpleGeometries
+		 * @param LayerName optional parameter, when specified, will only return the overlapping geometries for the given layer.
 		 * @return An array of keys.
 		 */		
-		public function getKeysOverlappingGeometry(simpleGeometries:Array):Array
+		public function getKeysOverlappingGeometry(simpleGeometries:Array, layerName:String = null):Array
 		{
 			var key:IQualifiedKey;
 			var keys:Dictionary = new Dictionary();
-			var simpleGeometry:ISimpleGeometry;
-			var names:Array = plotters.getNames();
+			var geometry:Object;
+			
+			var names:Array = layerName ? [layerName] : plotters.getNames();
+			
 			
 			// Go through the layers and make a query for each layer
 			for each (var name:String in names)
 			{
 				var spatialIndex:SpatialIndex = _name_to_SpatialIndex[name] as SpatialIndex;
-				for each (simpleGeometry in simpleGeometries)
-				{
-					var queriedKeys:Array = spatialIndex.getKeysGeometryOverlapGeometry(simpleGeometry);
+				for each (geometry in simpleGeometries)
+				{
+					var simpleGeometry:ISimpleGeometry = geometry as ISimpleGeometry;	
+					var queriedKeys:Array;
+					
+					if ( geometry is GeneralizedGeometry )
+					{						
+						var geometryAsSimpleGeometries:Array = (geometry as GeneralizedGeometry).getSimpleGeometries();
+						queriedKeys = spatialIndex.getKeysGeometryOverlapGeometries(geometryAsSimpleGeometries);
+					}
+					else if (simpleGeometry)
+					{
+						queriedKeys = spatialIndex.getKeysGeometryOverlapGeometry(simpleGeometry);
+					}
+						
 					// use the dictionary to handle duplicates
 					for each (key in queriedKeys)
 					{

	import weave.api.registerLinkableChild;
	import weave.api.setSessionState;
	import weave.api.ui.IPlotter;
	import weave.api.ui.ITextPlotter;
	import weave.compiler.StandardLib;
	import weave.core.LinkableBoolean;

	import weave.core.LinkableString;
	import weave.core.SessionManager;
	import weave.primitives.Bounds2D;
	import weave.primitives.GeneralizedGeometry;
	import weave.primitives.ZoomBounds;
	import weave.utils.ColumnUtils;
	import weave.utils.NumberUtils;
	import weave.utils.PlotterUtils;
	import weave.utils.SpatialIndex;
	import weave.utils.ZoomUtils;

	/**
	 * This is a container for a list of PlotLayers
