openlayers/openlayers — pull request #1375 by ahocevar (2014-08-08 08:57:38+00:00)
Title: Graticule control improvements

Assuming that the map's maxExtent does not exceed the validity extent of the map projection, we can avoid invalid graticule grid points by limiting the graticule to the map's maxExtent. Currently we use the viewport extent, which may exceed the maxExtent, and thus can cause invalid point transforms beyond the validity extent of the projection.