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