openlayers/openlayers — pull request #823 by probins (2013-01-06 15:25:30+00:00)
Title: Overview map should use map.getMaxExtent

following on from #822 there is a small regression with https://github.com/openlayers/openlayers/commit/11966d231ffac3753534e231341c706b0daf1daa which removed the default setting of map.maxExtent for maps not in 4326/web mercator. Control/OverviewMap uses this and fails if it is not set. A comment was added to map.projection to set maxExtent if not in those projections, but not to map.maxExtent.

AFAICS map.maxExtent is only used by Layer as a default, and in 3 other classes: Control/OverviewMap and Layer/TMS and Layer/Zoomify.

ISTM it would be better if OverviewMap were changed to use the accessor. Layer/XYZ uses its own maxExtent; cannot TMS and Zoomify do the same? If so, then it would no longer be necessary to set map.maxExtent except as a convenience for layer default.