openlayers/openlayers — pull request #177 by ahocevar (2012-01-25 11:35:45+00:00)
Title: Use map's getter methods to set map defaults on layer.

Layer.setMap takes maxExtent, resolution and units from the map if the layer doesn't provide its own. This causes strange results when the correct properties are set on the baseLayer, but not on the map. This change fixes that by using the map's getter methods instead of accessing the map properties directly. (Note: the map properties are still used as fallback after using the getters, to keep satisfying tests with mocked map objects).