diff --git a/externs/olx.js b/externs/olx.js index 5d03d0b633..44d7f0afee 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -2622,7 +2622,6 @@ olx.source.BingMapsOptions.prototype.tileLoadFunction; /** * @typedef {{attributions: (Array.|undefined), - * extent: (ol.Extent|undefined), * format: ol.format.Feature, * logo: (string|olx.LogoOptions|undefined), * projection: ol.proj.ProjectionLike}} @@ -2638,13 +2637,6 @@ olx.source.FormatVectorOptions; olx.source.FormatVectorOptions.prototype.attributions; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.FormatVectorOptions.prototype.extent; - - /** * Format. * @type {ol.format.Feature} @@ -2669,7 +2661,6 @@ olx.source.FormatVectorOptions.prototype.projection; /** * @typedef {{attributions: (Array.|undefined), * defaultProjection: ol.proj.ProjectionLike, - * extent: (ol.Extent|undefined), * logo: (string|olx.LogoOptions|undefined), * object: (GeoJSONObject|undefined), * projection: ol.proj.ProjectionLike, @@ -2695,13 +2686,6 @@ olx.source.GeoJSONOptions.prototype.attributions; olx.source.GeoJSONOptions.prototype.defaultProjection; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.GeoJSONOptions.prototype.extent; - - /** * Logo. * @type{string|olx.LogoOptions|undefined} @@ -2748,7 +2732,6 @@ olx.source.GeoJSONOptions.prototype.urls; /** * @typedef {{attributions: (Array.|undefined), * doc: (Document|undefined), - * extent: (ol.Extent|undefined), * logo: (string|olx.LogoOptions|undefined), * node: (Node|undefined), * projection: ol.proj.ProjectionLike, @@ -2774,13 +2757,6 @@ olx.source.GPXOptions.prototype.attributions; olx.source.GPXOptions.prototype.doc; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.GPXOptions.prototype.extent; - - /** * Logo. * @type{string|olx.LogoOptions|undefined} @@ -2827,7 +2803,6 @@ olx.source.GPXOptions.prototype.urls; /** * @typedef {{attributions: (Array.|undefined), * crossOrigin: (null|string|undefined), - * extent: (ol.Extent|undefined), * logo: (string|olx.LogoOptions|undefined), * opaque: (boolean|undefined), * projection: ol.proj.ProjectionLike, @@ -2857,13 +2832,6 @@ olx.source.TileImageOptions.prototype.attributions; olx.source.TileImageOptions.prototype.crossOrigin; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.TileImageOptions.prototype.extent; - - /** * Logo. * @type{string|olx.LogoOptions|undefined} @@ -2928,7 +2896,6 @@ olx.source.TileImageOptions.prototype.tileUrlFunction; /** * @typedef {{attributions: (Array.|undefined), * defaultProjection: ol.proj.ProjectionLike, - * extent: (ol.Extent|undefined), * format: ol.format.Feature, * logo: (string|olx.LogoOptions|undefined), * object: (GeoJSONObject|undefined), @@ -2956,13 +2923,6 @@ olx.source.TileVectorOptions.prototype.attributions; olx.source.TileVectorOptions.prototype.defaultProjection; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.TileVectorOptions.prototype.extent; - - /** * Format. * @type {ol.format.Feature} @@ -3024,7 +2984,6 @@ olx.source.TileVectorOptions.prototype.urls; /** * @typedef {{attributions: (Array.|undefined), * defaultProjection: ol.proj.ProjectionLike, - * extent: (ol.Extent|undefined), * logo: (string|olx.LogoOptions|undefined), * object: (GeoJSONObject|undefined), * projection: ol.proj.ProjectionLike, @@ -3049,13 +3008,6 @@ olx.source.TopoJSONOptions.prototype.attributions; olx.source.TopoJSONOptions.prototype.defaultProjection; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.TopoJSONOptions.prototype.extent; - - /** * Logo. * @type{string|olx.LogoOptions|undefined} @@ -3144,7 +3096,6 @@ olx.source.IGCOptions.prototype.urls; * @typedef {{url: (string|undefined), * displayDpi: (number|undefined), * metersPerUnit: (number|undefined), - * extent: (ol.Extent|undefined), * hidpi: (boolean|undefined), * useOverlay: (boolean|undefined), * projection: ol.proj.ProjectionLike, @@ -3177,13 +3128,6 @@ olx.source.MapGuideOptions.prototype.displayDpi; olx.source.MapGuideOptions.prototype.metersPerUnit; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.MapGuideOptions.prototype.extent; - - /** * Use the `ol.Map#pixelRatio` value when requesting the image from the remote * server. Default is `true`. @@ -3232,7 +3176,6 @@ olx.source.MapGuideOptions.prototype.params; * @typedef {{attributions: (Array.|undefined), * defaultStyle: (Array.|undefined), * doc: (Document|undefined), - * extent: (ol.Extent|undefined), * logo: (string|olx.LogoOptions|undefined), * node: (Node|undefined), * projection: ol.proj.ProjectionLike, @@ -3265,13 +3208,6 @@ olx.source.KMLOptions.prototype.defaultStyle; olx.source.KMLOptions.prototype.doc; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.KMLOptions.prototype.extent; - - /** * Logo. * @type{string|olx.LogoOptions|undefined} @@ -3338,21 +3274,13 @@ olx.source.MapQuestOptions.prototype.tileLoadFunction; /** - * @typedef {{extent: (ol.Extent|undefined), - * projection: ol.proj.ProjectionLike, + * @typedef {{projection: ol.proj.ProjectionLike, * tileGrid: (ol.tilegrid.TileGrid|undefined)}} * @api */ olx.source.TileDebugOptions; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.TileDebugOptions.prototype.extent; - - /** * Projection. * @type {ol.proj.ProjectionLike} @@ -3418,7 +3346,6 @@ olx.source.OSMOptions.prototype.url; * @typedef {{attributions: (Array.|undefined), * defaultStyle: (Array.|undefined), * doc: (Document|undefined), - * extent: (ol.Extent|undefined), * logo: (string|olx.LogoOptions|undefined), * node: (Node|undefined), * projection: ol.proj.ProjectionLike, @@ -3452,13 +3379,6 @@ olx.source.OSMXMLOptions.prototype.defaultStyle; olx.source.OSMXMLOptions.prototype.doc; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.OSMXMLOptions.prototype.extent; - - /** * Logo. * @type{string|olx.LogoOptions|undefined} @@ -3511,7 +3431,6 @@ olx.source.OSMXMLOptions.prototype.urls; /** * @typedef {{attributions: (Array.|undefined), * canvasFunction: ol.CanvasFunctionType, - * extent: (ol.Extent|undefined), * logo: (string|olx.LogoOptions|undefined), * projection: ol.proj.ProjectionLike, * ratio: (number|undefined), @@ -3543,13 +3462,6 @@ olx.source.ImageCanvasOptions.prototype.attributions; olx.source.ImageCanvasOptions.prototype.canvasFunction; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.ImageCanvasOptions.prototype.extent; - - /** * Logo. * @type{string|olx.LogoOptions|undefined} @@ -3589,7 +3501,6 @@ olx.source.ImageCanvasOptions.prototype.state; /** * @typedef {{attributions: (Array.|undefined), - * extent: (ol.Extent|undefined), * logo: (string|olx.LogoOptions|undefined), * projection: ol.proj.ProjectionLike, * ratio: (number|undefined), @@ -3608,13 +3519,6 @@ olx.source.ImageVectorOptions; olx.source.ImageVectorOptions.prototype.attributions; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.ImageVectorOptions.prototype.extent; - - /** * Logo. * @type{string|olx.LogoOptions|undefined} @@ -3663,7 +3567,6 @@ olx.source.ImageVectorOptions.prototype.style; /** * @typedef {{attributions: (Array.|undefined), * crossOrigin: (null|string|undefined), - * extent: (ol.Extent|undefined), * hidpi: (boolean|undefined), * serverType: (ol.source.wms.ServerType|string|undefined), * logo: (string|olx.LogoOptions|undefined), @@ -3691,13 +3594,6 @@ olx.source.ImageWMSOptions.prototype.attributions; olx.source.ImageWMSOptions.prototype.crossOrigin; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.ImageWMSOptions.prototype.extent; - - /** * Use the `ol.Map#pixelRatio` value when requesting the image from the remote * server. Default is `true`. @@ -3816,7 +3712,6 @@ olx.source.StamenOptions.prototype.url; /** * @typedef {{attributions: (Array.|undefined), * crossOrigin: (null|string|undefined), - * extent: (ol.Extent|undefined), * imageExtent: (ol.Extent|undefined), * imageSize: (ol.Size|undefined), * logo: (string|olx.LogoOptions|undefined), @@ -3841,13 +3736,6 @@ olx.source.ImageStaticOptions.prototype.attributions; olx.source.ImageStaticOptions.prototype.crossOrigin; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.ImageStaticOptions.prototype.extent; - - /** * Extent of the image. * @type {ol.Extent|undefined} @@ -3885,7 +3773,6 @@ olx.source.ImageStaticOptions.prototype.url; /** * @typedef {{attributions: (Array.|undefined), - * extent: (ol.Extent|undefined), * format: ol.format.Feature, * loader: function(this: ol.source.ServerVector, ol.Extent, number, ol.proj.Projection), * strategy: (function(ol.Extent, number): Array.|undefined), @@ -3903,13 +3790,6 @@ olx.source.ServerVectorOptions; olx.source.ServerVectorOptions.prototype.attributions; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.ServerVectorOptions.prototype.extent; - - /** * Format. * @type {ol.format.Feature} @@ -3980,7 +3860,6 @@ olx.source.TileJSONOptions.prototype.url; * @typedef {{attributions: (Array.|undefined), * params: Object., * crossOrigin: (null|string|undefined), - * extent: (ol.Extent|undefined), * gutter: (number|undefined), * hidpi: (boolean|undefined), * logo: (string|olx.LogoOptions|undefined), @@ -4019,13 +3898,6 @@ olx.source.TileWMSOptions.prototype.params; olx.source.TileWMSOptions.prototype.crossOrigin; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.TileWMSOptions.prototype.extent; - - /** * The size in pixels of the gutter around image tiles to ignore. By setting * this property to a non-zero value, images will be requested that are wider @@ -4112,7 +3984,6 @@ olx.source.TileWMSOptions.prototype.urls; /** * @typedef {{attributions: (Array.|undefined), - * extent: (ol.Extent|undefined), * features: (Array.|undefined), * logo: (string|olx.LogoOptions|undefined), * projection: ol.proj.ProjectionLike, @@ -4129,13 +4000,6 @@ olx.source.VectorOptions; olx.source.VectorOptions.prototype.attributions; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.VectorOptions.prototype.extent; - - /** * Features. * @type {Array.|undefined} @@ -4168,7 +4032,6 @@ olx.source.VectorOptions.prototype.state; * @typedef {{arrayBuffer: (ArrayBuffer|undefined), * attributions: (Array.|undefined), * doc: (Document|undefined), - * extent: (ol.Extent|undefined), * format: ol.format.Feature, * logo: (string|olx.LogoOptions|undefined), * node: (Node|undefined), @@ -4203,13 +4066,6 @@ olx.source.StaticVectorOptions.prototype.attributions; olx.source.StaticVectorOptions.prototype.doc; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.StaticVectorOptions.prototype.extent; - - /** * Format. * @type {ol.format.Feature} @@ -4269,7 +4125,6 @@ olx.source.StaticVectorOptions.prototype.urls; /** * @typedef {{attributions: (Array.|undefined), * crossOrigin: (string|null|undefined), - * extent: (ol.Extent|undefined), * logo: (string|olx.LogoOptions|undefined), * tileGrid: ol.tilegrid.WMTS, * projection: ol.proj.ProjectionLike, @@ -4304,13 +4159,6 @@ olx.source.WMTSOptions.prototype.attributions; olx.source.WMTSOptions.prototype.crossOrigin; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.WMTSOptions.prototype.extent; - - /** * Logo. * @type{string|olx.LogoOptions|undefined} @@ -4422,7 +4270,6 @@ olx.source.WMTSOptions.prototype.urls; /** * @typedef {{attributions: (Array.|undefined), * crossOrigin: (null|string|undefined), - * extent: (ol.Extent|undefined), * logo: (string|olx.LogoOptions|undefined), * projection: ol.proj.ProjectionLike, * maxZoom: (number|undefined), @@ -4452,13 +4299,6 @@ olx.source.XYZOptions.prototype.attributions; olx.source.XYZOptions.prototype.crossOrigin; -/** - * Extent. - * @type {ol.Extent|undefined} - */ -olx.source.XYZOptions.prototype.extent; - - /** * Logo. * @type{string|olx.LogoOptions|undefined} diff --git a/src/ol/source/debugtilesource.js b/src/ol/source/debugtilesource.js index 999bd81b69..de6c580655 100644 --- a/src/ol/source/debugtilesource.js +++ b/src/ol/source/debugtilesource.js @@ -89,7 +89,6 @@ ol.DebugTile_.prototype.getImage = function(opt_context) { ol.source.TileDebug = function(options) { goog.base(this, { - extent: options.extent, opaque: false, projection: options.projection, tileGrid: options.tileGrid diff --git a/src/ol/source/formatvectorsource.js b/src/ol/source/formatvectorsource.js index 2a5e383145..3911da274f 100644 --- a/src/ol/source/formatvectorsource.js +++ b/src/ol/source/formatvectorsource.js @@ -33,7 +33,6 @@ ol.source.FormatVector = function(options) { goog.base(this, { attributions: options.attributions, - extent: options.extent, logo: options.logo, projection: options.projection }); diff --git a/src/ol/source/imagecanvassource.js b/src/ol/source/imagecanvassource.js index 99fe1365a7..d76e7c7adc 100644 --- a/src/ol/source/imagecanvassource.js +++ b/src/ol/source/imagecanvassource.js @@ -20,7 +20,6 @@ ol.source.ImageCanvas = function(options) { goog.base(this, { attributions: options.attributions, - extent: options.extent, logo: options.logo, projection: options.projection, resolutions: options.resolutions, diff --git a/src/ol/source/imagestaticsource.js b/src/ol/source/imagestaticsource.js index d6d721013d..5eda133275 100644 --- a/src/ol/source/imagestaticsource.js +++ b/src/ol/source/imagestaticsource.js @@ -31,7 +31,6 @@ ol.source.ImageStatic = function(options) { goog.base(this, { attributions: attributions, - extent: options.extent, logo: options.logo, projection: projection, resolutions: [imageResolution] diff --git a/src/ol/source/imagevectorsource.js b/src/ol/source/imagevectorsource.js index d444c51762..4ce73c04cf 100644 --- a/src/ol/source/imagevectorsource.js +++ b/src/ol/source/imagevectorsource.js @@ -75,7 +75,6 @@ ol.source.ImageVector = function(options) { goog.base(this, { attributions: options.attributions, canvasFunction: goog.bind(this.canvasFunctionInternal_, this), - extent: options.extent, logo: options.logo, projection: options.projection, ratio: options.ratio, diff --git a/src/ol/source/imagewmssource.js b/src/ol/source/imagewmssource.js index e7663c90bb..95b9980219 100644 --- a/src/ol/source/imagewmssource.js +++ b/src/ol/source/imagewmssource.js @@ -31,7 +31,6 @@ ol.source.ImageWMS = function(opt_options) { goog.base(this, { attributions: options.attributions, - extent: options.extent, logo: options.logo, projection: options.projection, resolutions: options.resolutions diff --git a/src/ol/source/kmlsource.js b/src/ol/source/kmlsource.js index 8cdfb8f621..27c6e0bd83 100644 --- a/src/ol/source/kmlsource.js +++ b/src/ol/source/kmlsource.js @@ -22,7 +22,6 @@ ol.source.KML = function(opt_options) { goog.base(this, { attributions: options.attributions, doc: options.doc, - extent: options.extent, format: new ol.format.KML({ defaultStyle: options.defaultStyle }), diff --git a/src/ol/source/mapguidesource.js b/src/ol/source/mapguidesource.js index fdd1ce664f..283d4cff71 100644 --- a/src/ol/source/mapguidesource.js +++ b/src/ol/source/mapguidesource.js @@ -21,7 +21,6 @@ goog.require('ol.source.Image'); ol.source.MapGuide = function(options) { goog.base(this, { - extent: options.extent, projection: options.projection, resolutions: options.resolutions }); diff --git a/src/ol/source/osmxmlsource.js b/src/ol/source/osmxmlsource.js index 989786e6f7..dc6dff6c62 100644 --- a/src/ol/source/osmxmlsource.js +++ b/src/ol/source/osmxmlsource.js @@ -22,7 +22,6 @@ ol.source.OSMXML = function(opt_options) { goog.base(this, { attributions: options.attributions, doc: options.doc, - extent: options.extent, format: new ol.format.OSMXML(), logo: options.logo, node: options.node, diff --git a/src/ol/source/servervectorsource.js b/src/ol/source/servervectorsource.js index ac5add8dcc..b2b4f6e873 100644 --- a/src/ol/source/servervectorsource.js +++ b/src/ol/source/servervectorsource.js @@ -23,7 +23,6 @@ ol.source.ServerVector = function(options) { goog.base(this, { attributions: options.attributions, - extent: options.extent, format: options.format, logo: options.logo, projection: options.projection diff --git a/src/ol/source/source.js b/src/ol/source/source.js index a7633ecd9f..b02f016cb0 100644 --- a/src/ol/source/source.js +++ b/src/ol/source/source.js @@ -22,7 +22,6 @@ ol.source.State = { /** * @typedef {{attributions: (Array.|undefined), - * extent: (ol.Extent|undefined), * logo: (string|olx.LogoOptions|undefined), * projection: ol.proj.ProjectionLike, * state: (ol.source.State|string|undefined)}} @@ -52,14 +51,6 @@ ol.source.Source = function(options) { */ this.projection_ = ol.proj.get(options.projection); - /** - * @private - * @type {ol.Extent} - */ - this.extent_ = goog.isDef(options.extent) ? - options.extent : goog.isDef(options.projection) ? - this.projection_.getExtent() : null; - /** * @private * @type {Array.} @@ -106,14 +97,6 @@ ol.source.Source.prototype.getAttributions = function() { }; -/** - * @return {ol.Extent} Extent. - */ -ol.source.Source.prototype.getExtent = function() { - return this.extent_; -}; - - /** * @return {string|olx.LogoOptions|undefined} Logo. */ @@ -153,14 +136,6 @@ ol.source.Source.prototype.setAttributions = function(attributions) { }; -/** - * @param {ol.Extent} extent Extent. - */ -ol.source.Source.prototype.setExtent = function(extent) { - this.extent_ = extent; -}; - - /** * @param {string|olx.LogoOptions|undefined} logo Logo. */ diff --git a/src/ol/source/staticvectorsource.js b/src/ol/source/staticvectorsource.js index 6f5beffa97..24c2aa7393 100644 --- a/src/ol/source/staticvectorsource.js +++ b/src/ol/source/staticvectorsource.js @@ -22,7 +22,6 @@ ol.source.StaticVector = function(options) { goog.base(this, { attributions: options.attributions, - extent: options.extent, format: options.format, logo: options.logo, projection: options.projection diff --git a/src/ol/source/tilejsonsource.js b/src/ol/source/tilejsonsource.js index 13df6d5989..24c1ba8402 100644 --- a/src/ol/source/tilejsonsource.js +++ b/src/ol/source/tilejsonsource.js @@ -59,7 +59,6 @@ ol.source.TileJSON.prototype.handleTileJSONResponse = function(tileJSON) { var transform = ol.proj.getTransformFromProjections( epsg4326Projection, this.getProjection()); extent = ol.extent.applyTransform(tileJSON.bounds, transform); - this.setExtent(extent); } if (goog.isDef(tileJSON.scheme)) { diff --git a/src/ol/source/tilevectorsource.js b/src/ol/source/tilevectorsource.js index 4637e8a8c4..6b8fb5fd2f 100644 --- a/src/ol/source/tilevectorsource.js +++ b/src/ol/source/tilevectorsource.js @@ -24,7 +24,6 @@ ol.source.TileVector = function(options) { goog.base(this, { attributions: options.attributions, - extent: options.extent, format: options.format, logo: options.logo, projection: options.projection @@ -48,9 +47,7 @@ ol.source.TileVector = function(options) { * @private * @type {ol.TileCoordTransformType} */ - this.tileCoordTransform_ = tileGrid.createTileCoordTransform({ - extent: options.extent - }); + this.tileCoordTransform_ = tileGrid.createTileCoordTransform(); /** * @private diff --git a/src/ol/source/tilewmssource.js b/src/ol/source/tilewmssource.js index 46ea249a5c..d0d4c5c5f6 100644 --- a/src/ol/source/tilewmssource.js +++ b/src/ol/source/tilewmssource.js @@ -40,7 +40,6 @@ ol.source.TileWMS = function(opt_options) { goog.base(this, { attributions: options.attributions, crossOrigin: options.crossOrigin, - extent: options.extent, logo: options.logo, opaque: !transparent, projection: options.projection, @@ -394,12 +393,6 @@ ol.source.TileWMS.prototype.tileUrlFunction_ = tileResolution * gutter, tileExtent); } - var extent = this.getExtent(); - if (!goog.isNull(extent) && (!ol.extent.intersects(tileExtent, extent) || - ol.extent.touches(tileExtent, extent))) { - return undefined; - } - if (pixelRatio != 1) { tileSize = (tileSize * pixelRatio + 0.5) | 0; } diff --git a/src/ol/source/vectorsource.js b/src/ol/source/vectorsource.js index e368b5c00a..7353292b24 100644 --- a/src/ol/source/vectorsource.js +++ b/src/ol/source/vectorsource.js @@ -54,7 +54,6 @@ ol.source.Vector = function(opt_options) { goog.base(this, { attributions: options.attributions, - extent: options.extent, logo: options.logo, projection: options.projection, state: options.state @@ -332,6 +331,7 @@ ol.source.Vector.prototype.getClosestFeatureToCoordinate = /** + * Get the extent of the features currently in the source. * @return {ol.Extent} Extent. * @api */ diff --git a/src/ol/source/wmtssource.js b/src/ol/source/wmtssource.js index ec14dc39b3..a9ed21da7f 100644 --- a/src/ol/source/wmtssource.js +++ b/src/ol/source/wmtssource.js @@ -154,13 +154,9 @@ ol.source.WMTS = function(options) { var x = tileCoord.x; var y = -tileCoord.y - 1; var tileExtent = tileGrid.getTileCoordExtent(tileCoord); - var projectionExtent = projection.getExtent(); - var extent = goog.isDef(options.extent) ? - options.extent : projectionExtent; + var extent = projection.getExtent(); - if (!goog.isNull(extent) && projection.isGlobal() && - extent[0] === projectionExtent[0] && - extent[2] === projectionExtent[2]) { + if (!goog.isNull(extent) && projection.isGlobal()) { var numCols = Math.ceil( ol.extent.getWidth(extent) / ol.extent.getWidth(tileExtent)); @@ -181,7 +177,6 @@ ol.source.WMTS = function(options) { goog.base(this, { attributions: options.attributions, crossOrigin: options.crossOrigin, - extent: options.extent, logo: options.logo, projection: options.projection, tileGrid: tileGrid, diff --git a/src/ol/source/xyzsource.js b/src/ol/source/xyzsource.js index faca7ae717..5ccf3bec14 100644 --- a/src/ol/source/xyzsource.js +++ b/src/ol/source/xyzsource.js @@ -30,7 +30,6 @@ ol.source.XYZ = function(options) { goog.base(this, { attributions: options.attributions, crossOrigin: options.crossOrigin, - extent: options.extent, logo: options.logo, projection: projection, tileGrid: tileGrid, @@ -44,7 +43,6 @@ ol.source.XYZ = function(options) { * @type {ol.TileCoordTransformType} */ this.tileCoordTransform_ = tileGrid.createTileCoordTransform({ - extent: options.extent, wrapX: options.wrapX }); diff --git a/test/spec/ol/source/tilewmssource.test.js b/test/spec/ol/source/tilewmssource.test.js index c64247d3fb..d62dee4f46 100644 --- a/test/spec/ol/source/tilewmssource.test.js +++ b/test/spec/ol/source/tilewmssource.test.js @@ -126,22 +126,6 @@ describe('ol.source.TileWMS', function() { expect(queryData.get('BBOX')).to.be('-45,-45,0,0'); }); - it('does not return a tile if it touches layers extent', function() { - options.extent = [-80, -40, -45, -10]; - var source = new ol.source.TileWMS(options); - var tileCoord = new ol.TileCoord(3, 3, 1); - var url = source.tileUrlFunction(tileCoord, 1, ol.proj.get('EPSG:4326')); - expect(url).to.be(undefined); - }); - - it('does not return a tile outside of layers extent', function() { - options.extent = [-80, -40, -45, -10]; - var source = new ol.source.TileWMS(options); - var tileCoord = new ol.TileCoord(3, 4, 2); - var url = source.tileUrlFunction(tileCoord, 1, ol.proj.get('EPSG:4326')); - expect(url).to.be(undefined); - }); - }); describe('#getGetFeatureInfo', function() {