Map constructor now calls on div argument, so that developer doesn't need to.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@57 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2006-05-16 19:31:59 +00:00
parent 47bf4cdad8
commit 143fd8d170
2 changed files with 2 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ OpenLayers.Map.prototype = {
initialize: function (div, options) {
Object.extend(this, options);
this.div = div;
this.div = $(div);
this.viewPortDiv = OpenLayers.Util.createDiv(
div.id + "_OpenLayers_ViewPort" );

View File

@@ -6,7 +6,7 @@
function test_01_Map_constructor (t) {
t.plan( 12 );
map = new OpenLayers.Map($('map'));
map = new OpenLayers.Map('map'); // no longer need to call $(), constructor does it
t.ok( map instanceof OpenLayers.Map, "new OpenLayers.Map returns object" );
t.ok( map.div instanceof HTMLDivElement, "map.div is an HTMLDivElement" );
t.ok( map.controlDiv instanceof HTMLDivElement, "map.controlDiv is an HTMLDivElement" );