We study the correlation between the locations of galaxy-galaxy strong-lensing candidates and tracers of large-scale structure from both weak lensing (WL) or X-ray emission. The Cosmological Evolution Survey (COSMOS) is a unique data set, combining deep, high resolution and contiguous imaging in which strong lenses have been discovered, plus unparalleled multiwavelength coverage. To help interpret the COSMOS data, we have also produced mock COSMOS strong-and WL observations, based on ray-tracing through the Millennium Simulation. In agreement with the simulations, we find that strongly lensed images with the largest angular separations are found in the densest regions of the COSMOS field. This is explained by a prevalence among the lens population in dense environments of elliptical galaxies with high total-to-stellar mass ratios, which can deflect light through larger angles. However, we also find that the overall fraction of elliptical galaxies with strong gravitational lensing is independent of the local mass density; this observation is not true of the simulations, which predict an increasing fraction of strong lenses in dense environments. The discrepancy may be a real effect, but could also be explained by various limitations of our analysis. For example, our visual search of strong lens systems could be incomplete and suffer from selection bias; the luminosity function of elliptical galaxies may differ between our real and simulated data; or the simplifying assumptions and approximations used in our lensing simulations may be inadequate. Work is therefore ongoing. Automated searches for strong lens systems will be particularly important in better constraining the selection function.