make sure we do not fail if OpenLayers.Projection.defaults has not been set for a custom projection
This commit is contained in:
@@ -423,6 +423,26 @@
|
||||
t.ok( layer.grid == null, "grid set to null");
|
||||
}
|
||||
|
||||
function test_customProjection(t) {
|
||||
t.plan(1);
|
||||
var map = new OpenLayers.Map('map', {
|
||||
units: 'm',
|
||||
projection: new OpenLayers.Projection('EPSG:28992'),
|
||||
maxExtent: new OpenLayers.Bounds(0, 300000, 300000, 6250000)
|
||||
});
|
||||
var layer = new OpenLayers.Layer.WMS(null, url, {layers: 'mylayer', version: '1.3.0'});
|
||||
map.addLayer(layer);
|
||||
var error = false;
|
||||
try {
|
||||
map.setCenter(new OpenLayers.LonLat(100000,300000), 5);
|
||||
} catch(err) {
|
||||
error = true;
|
||||
}
|
||||
t.ok(!error, "no error on getURL if layer has a custom projection and no defaults defined");
|
||||
layer.destroy();
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
function test_Layer_WMS_v13(t) {
|
||||
|
||||
t.plan(6);
|
||||
|
||||
Reference in New Issue
Block a user