OpenLayers OpenLayers

Changeset 4013

Show
Ignore:
Timestamp:
08/24/07 08:26:51 (1 year ago)
Author:
euzuro
Message:

move initialization of maxExtent to the initialize function. this is an old old js whippersnapper. if you initialize that value in the protototype area, then all map24 layers will share the same bounds object as their maxextent, and changing one of them will change them all. dont want that.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/euzuro/map24/lib/OpenLayers/Layer/Map24.js

    r4012 r4013  
    6666     
    6767    /** 
    68      * APIProperty: maxExtent 
    69      * {<OpenLayers.Bounds>}  The center of these bounds will not stray outside 
    70      *     of the viewport extent during panning.  In addition, if 
    71      *     <displayOutsideMaxExtent> is set to false, data will not be 
    72      *     requested that falls completely outside of these bounds. 
    73      */ 
    74     maxExtent: new OpenLayers.Bounds(-180,-90,180,+90), 
    75      
    76     /** 
    7768     * Current center 
    7869     * (Map24.Coordinate) 
     
    110101     */ 
    111102    initialize: function(name, options) { 
     103 
    112104        if (options["numZoomLevels"] == null) { 
    113105            // default to all zoom levels instead of 16 
    114106            options["numZoomLevels"] = this.MAX_ZOOM_LEVEL + 1;   
    115107        } 
     108 
     109        // The center of these bounds will not stray outside 
     110        // of the viewport extent during panning.  In addition, if 
     111        // <displayOutsideMaxExtent> is set to false, data will not be 
     112        // requested that falls completely outside of these bounds. 
     113        this.maxExtent = new OpenLayers.Bounds(-180, -90, 180, 90); 
     114 
    116115        OpenLayers.Layer.EventPane.prototype.initialize.apply(this, arguments); 
    117116        OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,