Within the framework of two-dimensional geometry, we consider the properties of the electromagnetic fields excited by a filament source which is located near the surface of an elliptic cylinder, The cylinder is made of a metamaterial whose dielectric permittivity and magnetic permeability are equal to minus unity. The influence of the cylinder shape and the position of the source on the effects of subwavelength localization and nonresonance field enhancement is studied.