OpenLayers OpenLayers

Changeset 4334

Show
Ignore:
Timestamp:
09/16/07 12:01:51 (1 year ago)
Author:
crschmidt
Message:

Add Attribution control to the map by default. (No visual affect if no
layers have 'attribution' set.)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Map.js

    r4302 r4334  
    342342                this.controls = [ new OpenLayers.Control.Navigation(), 
    343343                                  new OpenLayers.Control.PanZoom(), 
    344                                   new OpenLayers.Control.ArgParser() 
     344                                  new OpenLayers.Control.ArgParser(), 
     345                                  new OpenLayers.Control.Attribution() 
    345346                                ]; 
    346347            } else { 
  • trunk/openlayers/tests/test_Map.html

    r4261 r4334  
    88 
    99    function test_01_Map_constructor (t) { 
    10         t.plan( 9 ); 
     10        t.plan( 10 ); 
    1111         
    1212        map = new OpenLayers.Map('map');  
     
    2828        t.ok( map.layers instanceof Array, "map.layers is an Array" ); 
    2929        t.ok( map.controls instanceof Array, "map.controls is an Array" ); 
     30        t.eq( map.controls.length, 4, "Default map has 4 controls." ); 
    3031        t.ok( map.events instanceof OpenLayers.Events, "map.events is an OpenLayers.Events" ); 
    3132        t.ok( map.getMaxExtent() instanceof OpenLayers.Bounds, "map.maxExtent is an OpenLayers.Bounds" );