OpenLayers OpenLayers

Changeset 1595

Show
Ignore:
Timestamp:
10/05/06 11:55:47 (2 years ago)
Author:
sderle
Message:

Test for the presence of OpenLayers.Control before attempting to load controls. Makes it possible to run Map.js in the lightweight version.

Files:

Legend:

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

    r1590 r1595  
    163163         
    164164        if (this.controls == null) { 
    165             this.controls = [ new OpenLayers.Control.MouseDefaults(), 
    166                               new OpenLayers.Control.PanZoom()]; 
     165            if (OpenLayers.Control != null) { // running full or lite? 
     166                this.controls = [ new OpenLayers.Control.MouseDefaults(), 
     167                                  new OpenLayers.Control.PanZoom()]; 
     168            } else { 
     169                this.controls = []; 
     170            } 
    167171        } 
    168172