Inline goog.isDef() property checks

This commit is contained in:
Tim Schaub
2015-09-27 10:21:50 -06:00
parent 7659e47e07
commit b36d697585
27 changed files with 58 additions and 58 deletions

View File

@@ -110,13 +110,13 @@ ol.source.TileUTFGrid.prototype.handleTileJSONResponse = function(tileJSON) {
var sourceProjection = this.getProjection();
var extent;
if (goog.isDef(tileJSON.bounds)) {
if (tileJSON.bounds !== undefined) {
var transform = ol.proj.getTransformFromProjections(
epsg4326Projection, sourceProjection);
extent = ol.extent.applyTransform(tileJSON.bounds, transform);
}
if (goog.isDef(tileJSON.scheme)) {
if (tileJSON.scheme !== undefined) {
goog.asserts.assert(tileJSON.scheme == 'xyz', 'tileJSON-scheme is "xyz"');
}
var minZoom = tileJSON.minzoom || 0;
@@ -138,7 +138,7 @@ ol.source.TileUTFGrid.prototype.handleTileJSONResponse = function(tileJSON) {
this.tileUrlFunction_ = ol.TileUrlFunction.createFromTemplates(grids);
if (goog.isDef(tileJSON.attribution)) {
if (tileJSON.attribution !== undefined) {
var attributionExtent = goog.isDef(extent) ?
extent : epsg4326Projection.getExtent();
/** @type {Object.<string, Array.<ol.TileRange>>} */