Rename _ol_source_TileArcGISRest_ to TileArcGISRest
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import ImageTile from '../../../../src/ol/ImageTile.js';
|
||||
import _ol_source_TileArcGISRest_ from '../../../../src/ol/source/TileArcGISRest.js';
|
||||
import TileArcGISRest from '../../../../src/ol/source/TileArcGISRest.js';
|
||||
import {get as getProjection} from '../../../../src/ol/proj.js';
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
describe('#getTile', function() {
|
||||
|
||||
it('returns a tile with the expected URL', function() {
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
var tile = source.getTile(3, 2, -7, 1, getProjection('EPSG:3857'));
|
||||
expect(tile).to.be.an(ImageTile);
|
||||
var uri = new URL(tile.src_);
|
||||
@@ -38,7 +38,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
});
|
||||
|
||||
it('returns a non floating point DPI value', function() {
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
var tile = source.getTile(3, 2, -7, 1.12, getProjection('EPSG:3857'));
|
||||
var uri = new URL(tile.src_);
|
||||
var queryData = uri.searchParams;
|
||||
@@ -47,7 +47,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
|
||||
it('takes DPI from params if specified', function() {
|
||||
options.params.DPI = 96;
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
var tile = source.getTile(3, 2, -7, 1.12, getProjection('EPSG:3857'));
|
||||
var uri = new URL(tile.src_);
|
||||
var queryData = uri.searchParams;
|
||||
@@ -58,7 +58,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
it('returns a tile with the expected URL with url list', function() {
|
||||
|
||||
options.urls = ['http://test1.com/MapServer', 'http://test2.com/MapServer'];
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
|
||||
var tile = source.getTile(3, 2, -7, 1, getProjection('EPSG:3857'));
|
||||
expect(tile).to.be.an(ImageTile);
|
||||
@@ -82,7 +82,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
|
||||
it('returns a tile with the expected URL for ImageServer', function() {
|
||||
options.url = 'http://example.com/ImageServer';
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
var tile = source.getTile(3, 2, -7, 1, getProjection('EPSG:3857'));
|
||||
expect(tile).to.be.an(ImageTile);
|
||||
var uri = new URL(tile.src_);
|
||||
@@ -105,7 +105,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
it('allows various parameters to be overridden', function() {
|
||||
options.params.FORMAT = 'png';
|
||||
options.params.TRANSPARENT = false;
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
var tile = source.getTile(3, 2, -3, 1, getProjection('EPSG:4326'));
|
||||
var uri = new URL(tile.src_);
|
||||
var queryData = uri.searchParams;
|
||||
@@ -115,7 +115,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
|
||||
it('allows adding rest option', function() {
|
||||
options.params.LAYERS = 'show:1,3,4';
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
var tile = source.getTile(3, 2, -3, 1, getProjection('EPSG:4326'));
|
||||
var uri = new URL(tile.src_);
|
||||
var queryData = uri.searchParams;
|
||||
@@ -126,7 +126,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
describe('#updateParams', function() {
|
||||
|
||||
it('add a new param', function() {
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
source.updateParams({'TEST': 'value'});
|
||||
|
||||
var tile = source.getTile(3, 2, -7, 1, getProjection('EPSG:3857'));
|
||||
@@ -138,7 +138,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
it('updates an existing param', function() {
|
||||
options.params.TEST = 'value';
|
||||
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
source.updateParams({'TEST': 'newValue'});
|
||||
|
||||
var tile = source.getTile(3, 2, -7, 1, getProjection('EPSG:3857'));
|
||||
@@ -153,7 +153,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
|
||||
it('verify getting a param', function() {
|
||||
options.params.TEST = 'value';
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
|
||||
var setParams = source.getParams();
|
||||
|
||||
@@ -163,7 +163,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
it('verify on adding a param', function() {
|
||||
options.params.TEST = 'value';
|
||||
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
source.updateParams({'TEST2': 'newValue'});
|
||||
|
||||
var setParams = source.getParams();
|
||||
@@ -174,7 +174,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
it('verify on update a param', function() {
|
||||
options.params.TEST = 'value';
|
||||
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
source.updateParams({'TEST': 'newValue'});
|
||||
|
||||
var setParams = source.getParams();
|
||||
@@ -189,7 +189,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
it('verify getting array of urls', function() {
|
||||
options.urls = ['http://test.com/MapServer', 'http://test2.com/MapServer'];
|
||||
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
|
||||
var urls = source.getUrls();
|
||||
|
||||
@@ -203,7 +203,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
|
||||
it('verify setting urls when not set yet', function() {
|
||||
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
source.setUrls(['http://test.com/MapServer', 'http://test2.com/MapServer']);
|
||||
|
||||
var urls = source.getUrls();
|
||||
@@ -214,7 +214,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
it('verify setting urls with existing list', function() {
|
||||
options.urls = ['http://test.com/MapServer', 'http://test2.com/MapServer'];
|
||||
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
source.setUrls(['http://test3.com/MapServer', 'http://test4.com/MapServer']);
|
||||
|
||||
var urls = source.getUrls();
|
||||
@@ -227,7 +227,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
|
||||
it('verify setting url with no urls', function() {
|
||||
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
source.setUrl('http://test.com/MapServer');
|
||||
|
||||
var urls = source.getUrls();
|
||||
@@ -238,7 +238,7 @@ describe('ol.source.TileArcGISRest', function() {
|
||||
it('verify setting url with list of urls', function() {
|
||||
options.urls = ['http://test.com/MapServer', 'http://test2.com/MapServer'];
|
||||
|
||||
var source = new _ol_source_TileArcGISRest_(options);
|
||||
var source = new TileArcGISRest(options);
|
||||
source.setUrl('http://test3.com/MapServer');
|
||||
|
||||
var urls = source.getUrls();
|
||||
|
||||
Reference in New Issue
Block a user