Merge pull request #4537 from bartvde/issue-4312

Allow specifying non default DPI on ol.source.TileArcGISRest
This commit is contained in:
Bart van den Eijnden
2015-12-11 13:42:26 +01:00
2 changed files with 13 additions and 1 deletions

View File

@@ -43,6 +43,16 @@ describe('ol.source.TileArcGISRest', function() {
expect(queryData.get('DPI')).to.be('101');
});
it('takes DPI from params if specified', function() {
options.params.DPI = 96;
var source = new ol.source.TileArcGISRest(options);
var tile = source.getTile(3, 2, -7, 1.12, ol.proj.get('EPSG:3857'));
var uri = new goog.Uri(tile.src_);
var queryData = uri.getQueryData();
expect(queryData.get('DPI')).to.be('108');
delete options.params.DPI;
});
it('returns a tile with the expected URL with url list', function() {
options.urls = ['http://test1.com/MapServer',