OpenLayers OpenLayers

Changeset 7013

Show
Ignore:
Timestamp:
04/25/08 21:32:39 (9 months ago)
Author:
edgemaster
Message:

Apply patch for #830 to sandbox, Reproject vector layers only after baseLayer has been redrawn, prevents issues with markers and 3rd party panes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/Google.js

    r6492 r7013  
    190190     */ 
    191191    onMapResize: function() { 
    192         this.mapObject.checkResize();   
     192        if(this.visibility) { 
     193            this.mapObject.checkResize();   
     194        } else { 
     195            this.windowResized = true; 
     196        } 
     197    }, 
     198     
     199    /** 
     200     * Method: display 
     201     * Hide or show the layer 
     202     * 
     203     * Parameters: 
     204     * display - {Boolean} 
     205     */ 
     206    display: function(display) { 
     207        OpenLayers.Layer.EventPane.prototype.display.apply(this, arguments); 
     208        if(this.div.style.display == "block" && this.windowResized) { 
     209            this.mapObject.checkResize(); 
     210            this.windowResized = false; 
     211        } 
    193212    }, 
    194213 
  • sandbox/edgemaster/openlayers/lib/OpenLayers/Map.js

    r7012 r7013  
    10141014                        newCenter.transform(oldProjection, newProjection); 
    10151015                        newExtent.transform(oldProjection, newProjection); 
    1016                          
     1016                    } 
     1017 
     1018                    //the new zoom will either come from the converted old 
     1019                    // Extent or from the current resolution of the map 
     1020                    var newZoom = (newExtent)  
     1021                        ? this.getZoomForExtent(newExtent, true) 
     1022                        : this.getZoomForResolution(this.resolution, true); 
     1023 
     1024                    // zoom and force zoom change 
     1025                    this.setCenter(newCenter, newZoom, false, true); 
     1026                     
     1027                    if(!oldProjection.equals(newProjection)) { 
    10171028                        // Also convert vector layers - assuming they are in the 
    10181029                        // same projection as the original baseLayer - we cannot 
     
    10251036                        } 
    10261037                    } 
    1027  
    1028                     //the new zoom will either come from the converted old 
    1029                     // Extent or from the current resolution of the map 
    1030                     var newZoom = (newExtent)  
    1031                         ? this.getZoomForExtent(newExtent, true) 
    1032                         : this.getZoomForResolution(this.resolution, true); 
    1033  
    1034                     // zoom and force zoom change 
    1035                     this.setCenter(newCenter, newZoom, false, true); 
    10361038                } 
    10371039