OpenLayers OpenLayers

Ticket #966: attribution_default.patch

File attribution_default.patch, 1.6 kB (added by crschmidt, 10 months ago)
  • tests/test_Map.html

    old new  
    77    var map; 
    88 
    99    function test_01_Map_constructor (t) { 
    10         t.plan( 9 ); 
     10        t.plan( 10 ); 
    1111         
    1212        map = new OpenLayers.Map('map');  
    1313        var baseLayer = new OpenLayers.Layer.WMS("Test Layer",  
     
    2727        } 
    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" ); 
    3233        t.ok( map.getNumZoomLevels() > 0, "map has a default numZoomLevels" ); 
  • lib/OpenLayers/Map.js

    old new  
    330330            if (OpenLayers.Control != null) { // running full or lite? 
    331331                this.controls = [ new OpenLayers.Control.Navigation(), 
    332332                                  new OpenLayers.Control.PanZoom(), 
    333                                   new OpenLayers.Control.ArgParser() 
     333                                  new OpenLayers.Control.ArgParser(), 
     334                                  new OpenLayers.Control.Attribution() 
    334335                                ]; 
    335336            } else { 
    336337                this.controls = [];