Rename _ol_source_ImageArcGISRest_ to ImageArcGISRest
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import _ol_source_ImageArcGISRest_ from '../../../../src/ol/source/ImageArcGISRest.js';
|
||||
import ImageArcGISRest from '../../../../src/ol/source/ImageArcGISRest.js';
|
||||
import {get as getProjection} from '../../../../src/ol/proj.js';
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
describe('#getImage', function() {
|
||||
|
||||
it('returns a image with the expected URL', function() {
|
||||
var source = new _ol_source_ImageArcGISRest_(options);
|
||||
var source = new ImageArcGISRest(options);
|
||||
var image = source.getImage([3, 2, -7, 1], resolution, pixelRatio, proj3857);
|
||||
var uri = new URL(image.src_);
|
||||
expect(uri.protocol).to.be('http:');
|
||||
@@ -35,7 +35,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
});
|
||||
|
||||
it('returns a non floating point DPI value', function() {
|
||||
var source = new _ol_source_ImageArcGISRest_(options);
|
||||
var source = new ImageArcGISRest(options);
|
||||
var image = source.getImage([3, 2, -7, 1.12], resolution, 1.01, proj3857);
|
||||
var uri = new URL(image.src_);
|
||||
var queryData = uri.searchParams;
|
||||
@@ -44,7 +44,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
|
||||
it('returns a image with the expected URL for ImageServer', function() {
|
||||
options.url = 'http://example.com/ImageServer';
|
||||
var source = new _ol_source_ImageArcGISRest_(options);
|
||||
var source = new ImageArcGISRest(options);
|
||||
var image = source.getImage([3, 2, -7, 1], resolution, pixelRatio, proj3857);
|
||||
var uri = new URL(image.src_);
|
||||
expect(uri.protocol).to.be('http:');
|
||||
@@ -61,7 +61,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
it('allows various parameters to be overridden', function() {
|
||||
options.params.FORMAT = 'png';
|
||||
options.params.TRANSPARENT = false;
|
||||
var source = new _ol_source_ImageArcGISRest_(options);
|
||||
var source = new ImageArcGISRest(options);
|
||||
var image = source.getImage([3, 2, -3, 1], resolution, pixelRatio, projection);
|
||||
var uri = new URL(image.src_);
|
||||
var queryData = uri.searchParams;
|
||||
@@ -71,7 +71,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
|
||||
it('allows adding rest option', function() {
|
||||
options.params.LAYERS = 'show:1,3,4';
|
||||
var source = new _ol_source_ImageArcGISRest_(options);
|
||||
var source = new ImageArcGISRest(options);
|
||||
var image = source.getImage([3, 2, -3, 1], resolution, pixelRatio, proj3857);
|
||||
var uri = new URL(image.src_);
|
||||
var queryData = uri.searchParams;
|
||||
@@ -82,7 +82,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
describe('#updateParams', function() {
|
||||
|
||||
it('add a new param', function() {
|
||||
var source = new _ol_source_ImageArcGISRest_(options);
|
||||
var source = new ImageArcGISRest(options);
|
||||
source.updateParams({'TEST': 'value'});
|
||||
|
||||
var image = source.getImage([3, 2, -7, 1], resolution, pixelRatio, proj3857);
|
||||
@@ -94,7 +94,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
it('updates an existing param', function() {
|
||||
options.params.TEST = 'value';
|
||||
|
||||
var source = new _ol_source_ImageArcGISRest_(options);
|
||||
var source = new ImageArcGISRest(options);
|
||||
source.updateParams({'TEST': 'newValue'});
|
||||
|
||||
var image = source.getImage([3, 2, -7, 1], resolution, pixelRatio, proj3857);
|
||||
@@ -109,7 +109,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
|
||||
it('verify getting a param', function() {
|
||||
options.params.TEST = 'value';
|
||||
var source = new _ol_source_ImageArcGISRest_(options);
|
||||
var source = new ImageArcGISRest(options);
|
||||
|
||||
var setParams = source.getParams();
|
||||
|
||||
@@ -119,7 +119,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
it('verify on adding a param', function() {
|
||||
options.params.TEST = 'value';
|
||||
|
||||
var source = new _ol_source_ImageArcGISRest_(options);
|
||||
var source = new ImageArcGISRest(options);
|
||||
source.updateParams({'TEST2': 'newValue'});
|
||||
|
||||
var setParams = source.getParams();
|
||||
@@ -130,7 +130,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
it('verify on update a param', function() {
|
||||
options.params.TEST = 'value';
|
||||
|
||||
var source = new _ol_source_ImageArcGISRest_(options);
|
||||
var source = new ImageArcGISRest(options);
|
||||
source.updateParams({'TEST': 'newValue'});
|
||||
|
||||
var setParams = source.getParams();
|
||||
@@ -145,7 +145,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
it('verify getting url', function() {
|
||||
options.url = 'http://test.com/MapServer';
|
||||
|
||||
var source = new _ol_source_ImageArcGISRest_(options);
|
||||
var source = new ImageArcGISRest(options);
|
||||
|
||||
var url = source.getUrl();
|
||||
|
||||
@@ -159,7 +159,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
|
||||
it('verify setting url when not set yet', function() {
|
||||
|
||||
var source = new _ol_source_ImageArcGISRest_(options);
|
||||
var source = new ImageArcGISRest(options);
|
||||
source.setUrl('http://test.com/MapServer');
|
||||
|
||||
var url = source.getUrl();
|
||||
@@ -170,7 +170,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
it('verify setting url with existing url', function() {
|
||||
options.url = 'http://test.com/MapServer';
|
||||
|
||||
var source = new _ol_source_ImageArcGISRest_(options);
|
||||
var source = new ImageArcGISRest(options);
|
||||
source.setUrl('http://test2.com/MapServer');
|
||||
|
||||
var url = source.getUrl();
|
||||
|
||||
Reference in New Issue
Block a user