@@ -91,7 +91,7 @@ ol.source.TileArcGISRest.prototype.getRequestUrl_ =
|
|||||||
pixelRatio, projection, params) {
|
pixelRatio, projection, params) {
|
||||||
|
|
||||||
var urls = this.urls;
|
var urls = this.urls;
|
||||||
if (urls.length === 0) {
|
if (!urls) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ ol.source.TileWMS.prototype.getRequestUrl_ =
|
|||||||
pixelRatio, projection, params) {
|
pixelRatio, projection, params) {
|
||||||
|
|
||||||
var urls = this.urls;
|
var urls = this.urls;
|
||||||
if (urls.length === 0) {
|
if (!urls) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,10 +298,12 @@ ol.source.TileWMS.prototype.resetCoordKeyPrefix_ = function() {
|
|||||||
var i = 0;
|
var i = 0;
|
||||||
var res = [];
|
var res = [];
|
||||||
|
|
||||||
|
if (this.urls) {
|
||||||
var j, jj;
|
var j, jj;
|
||||||
for (j = 0, jj = this.urls.length; j < jj; ++j) {
|
for (j = 0, jj = this.urls.length; j < jj; ++j) {
|
||||||
res[i++] = this.urls[j];
|
res[i++] = this.urls[j];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var key;
|
var key;
|
||||||
for (key in this.params_) {
|
for (key in this.params_) {
|
||||||
|
|||||||
@@ -13,6 +13,16 @@ describe('ol.source.TileWMS', function() {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('constructor', function() {
|
||||||
|
it('can be constructed without url or urls params', function() {
|
||||||
|
var source = new ol.source.TileWMS({
|
||||||
|
projection: 'EPSG:3857',
|
||||||
|
tileGrid: ol.tilegrid.createXYZ({maxZoom: 6})
|
||||||
|
});
|
||||||
|
expect(source).to.be.an(ol.source.TileWMS);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('#getTile', function() {
|
describe('#getTile', function() {
|
||||||
|
|
||||||
it('returns a tile with the expected URL', function() {
|
it('returns a tile with the expected URL', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user