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.
I don't know much about EPSG:42304 but can you explain how you get to the value of 30 here?