 									}
 									else if (genGeomIsLine)
 									{
-										distanceSq = ComputationalGeometryUtils.getUnscaledDistanceFromLine(
-											part[0].x, part[0].y, part[1].x, part[1].y,
-											xQueryCenter, yQueryCenter);
+										distanceSq = getMinimumUnscaledDistanceFromPolyLine(part, xQueryCenter, yQueryCenter);
 										
 										if (distanceSq <= Number.MIN_VALUE)
 											overlapsQueryCenter = true;

								}
								else if (simpleGeomIsLine)
								{
									distanceSq = ComputationalGeometryUtils.getUnscaledDistanceFromLine(
										vertices[0].x, vertices[0].y, vertices[1].x, vertices[1].y,
										xQueryCenter, yQueryCenter);
									if (distanceSq <= Number.MIN_VALUE)
										overlapsQueryCenter = true;
									else

			return _kdTree.queryRange(minKDKey, maxKDKey);
		}
		
		private function polygonOverlapsPolyLine(polygon:Array, line:Object):Boolean
		{
			for (var i:int = 0; i < line.length - 1; ++i)
			{
				if (ComputationalGeometryUtils.polygonOverlapsLine(
											_tempBoundsPolygon, 
											line[i].x, line[i].y,
											line[i + 1].x, line[i + 1].y	))
				{
					return true;
				}
			}
			
			return false;		
		}
		private function polygonOverlapsPolyPoint(polygon:Array, point:Object):Boolean
		{
			for (var i:int = 0; i < point.length; ++i)
			{
				if (ComputationalGeometryUtils.polygonOverlapsPoint(_tempBoundsPolygon, point[i].x, point[i].y))
					return true;
			}
			
			return false;
		}
		private function getMinimumUnscaledDistanceFromPolyLine(line:Object, x:Number, y:Number):Number
		{
			var min:Number = Number.POSITIVE_INFINITY;
			
			for (var i:int = 0; i < line.length - 1; ++i)
			{
				min = Math.min(
					ComputationalGeometryUtils.getUnscaledDistanceFromLine(line[i].x, line[i].y, line[i + 1].x, line[i + 1].y,x, y),
					min);
			}			
			return min;
		}
		private function getMinimumUnscaledDistanceFromPolyPoint(line:Object, x:Number, y:Number):Number
		{
			var min:Number = Number.POSITIVE_INFINITY;
			
			for (var i:int = 0; i < line.length; ++i)
			{
				min = Math.min(
					ComputationalGeometryUtils.getDistanceFromPointSq(line[i].x, line[i].y, x, y),
					min);
			}			
			return min;
		}
		/**
		 * This function will get the keys which intersect with the bounds.
		 * 
