Environmental heterogeneity, species diversity and co‐existence at different spatial scales