configure google zoom translation to return null if null passed in

git-svn-id: http://svn.openlayers.org/trunk/openlayers@920 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-07-07 17:00:34 +00:00
parent b0d9a997c1
commit 6f17fbf54a

View File

@@ -356,20 +356,30 @@ OpenLayers.Layer.Google.prototype = Object.extend( new OpenLayers.Layer(), {
* @param {int} gZoom
*
* @returns An OpenLayers Zoom level, translated from the passed in gZoom
* Returns null if null value is passed in
* @type int
*/
getOLZoomFromGZoom: function(gZoom) {
return (gZoom - 1);
var zoom = null;
if (gZoom != null) {
zoom = gZoom - 1;
}
return zoom;
},
/**
* @param {int} olZoom
*
* @returns A GZoom level, translated from the passed in olZoom
* Returns null if null value is passed in
* @type int
*/
getGZoomFromOLZoom: function(olZoom) {
return (olZoom + 1);
var zoom = null;
if (olZoom != null) {
zoom = olZoom + 1;
}
return zoom;
},
//