Inline goog.isDef() property checks
This commit is contained in:
@@ -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>>} */
|
||||
|
||||
Reference in New Issue
Block a user