Don't override tileSize, maxExtent and theme when calling

Map.setOptions(). Thanks pspencer for the review. (Closes #1206)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5505 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Frédéric Junod
2007-12-19 07:30:52 +00:00
parent 5c6934b0b0
commit 65ad59a277
2 changed files with 22 additions and 15 deletions

View File

@@ -33,6 +33,16 @@
t.ok( map.getNumZoomLevels() > 0, "map has a default numZoomLevels" );
}
function test_Map_setOptions(t) {
t.plan(2);
map = new OpenLayers.Map('map', {maxExtent: new OpenLayers.Bounds(100, 200, 300, 400)});
map.setOptions({theme: 'foo'});
t.eq(map.theme, 'foo', "theme is correctly set by setOptions");
t.ok(map.maxExtent.equals(new OpenLayers.Bounds(100, 200, 300, 400)),
"maxExtent is correct after calling setOptions");
}
function test_02_Map_center(t) {
t.plan(3);
map = new OpenLayers.Map('map');