[ol.layer.TileLayer, ol.layer.XYZ] add a getMaxResolution func to TileLayer, and make ol.layer.XYZ be just a projection and a number of zoom levels
This commit is contained in:
@@ -134,6 +134,38 @@ describe('ol.layer.TileLayer', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('get max resolution', function() {
|
||||
var layer;
|
||||
|
||||
beforeEach(function() {
|
||||
layer = new ol.layer.TileLayer();
|
||||
});
|
||||
|
||||
describe('with max resolution', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
layer.setMaxResolution(156543.03390625);
|
||||
});
|
||||
|
||||
it('returns the expected maxResolution', function() {
|
||||
var maxResolution = layer.getMaxResolution();
|
||||
expect(maxResolution).toEqual(156543.03390625);
|
||||
});
|
||||
});
|
||||
|
||||
describe('with projection', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
layer.setProjection(new ol.Projection("EPSG:3857"));
|
||||
});
|
||||
|
||||
it('returns the expected maxResolution', function() {
|
||||
var maxResolution = layer.getMaxResolution();
|
||||
expect(maxResolution).toEqual(156543.03390625);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('get data from the layer', function() {
|
||||
var layer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user