Merge pull request #305 from bbinet/check-isglobal
Do not wrap dateline if projection.isGlobal() is false
This commit is contained in:
@@ -49,9 +49,9 @@ ol.source.TiledWMS = function(tiledWMSOptions) {
|
|||||||
var tileExtent = tileGrid.getTileCoordExtent(tileCoord);
|
var tileExtent = tileGrid.getTileCoordExtent(tileCoord);
|
||||||
var projectionExtent = projection.getExtent();
|
var projectionExtent = projection.getExtent();
|
||||||
extent = goog.isDef(extent) ? extent : projectionExtent;
|
extent = goog.isDef(extent) ? extent : projectionExtent;
|
||||||
// FIXME do we want a wrapDateLine param? The code below will break maps
|
|
||||||
// with projections that do not span the whole world width.
|
if (goog.isDef(extent) && projection.isGlobal() &&
|
||||||
if (extent.minX === projectionExtent.minX &&
|
extent.minX === projectionExtent.minX &&
|
||||||
extent.maxX === projectionExtent.maxX) {
|
extent.maxX === projectionExtent.maxX) {
|
||||||
var numCols = Math.ceil(
|
var numCols = Math.ceil(
|
||||||
(extent.maxX - extent.minX) / (tileExtent.maxX - tileExtent.minX));
|
(extent.maxX - extent.minX) / (tileExtent.maxX - tileExtent.minX));
|
||||||
|
|||||||
Reference in New Issue
Block a user