Merge pull request #29 from fredj/map-original-options

Expose map original options. r=@elemoine
This commit is contained in:
Frédéric Junod
2012-02-28 07:07:31 -08:00
2 changed files with 27 additions and 0 deletions
+17
View File
@@ -2000,6 +2000,23 @@
t.eq(map.layerContainerDiv.style.top, '0px', 'layer container top correct');
}
function test_options(t) {
t.plan(2);
var map = new OpenLayers.Map('map');
t.eq(map.options, {}, 'map.options is empty with no options');
map.destroy();
var options = {
resolutions: [1,2,3,5],
projection: "EPSG:4326",
units: 'm'
};
var map = new OpenLayers.Map('map', options);
t.eq(map.options, options, 'map.options is a copy of the constructor option');
map.destroy();
}
function test_adjustZoom(t) {
t.plan(4);
var map = new OpenLayers.Map({