OpenLayers OpenLayers

Changeset 6888

Show
Ignore:
Timestamp:
04/13/08 11:20:48 (5 months ago)
Author:
edgemaster
Message:

Bringing in local changes

Files:

Legend:

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

    r6818 r6888  
    119119            "OpenLayers/Layer/TMS.js", 
    120120            "OpenLayers/Layer/TileCache.js", 
     121            "OpenLayers/Layer/OpenSpace.js", 
    121122            "OpenLayers/Popup/Anchored.js", 
    122123            "OpenLayers/Popup/AnchoredBubble.js", 
  • sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/Markers.js

    r6833 r6888  
    185185        return maxExtent; 
    186186    }, 
     187     
     188    /* APIMethod: transform 
     189     * Transform the Markers layer from source to dest projection.  
     190     * 
     191     * Parameters:  
     192     * source - {<OpenLayers.Projection>} Source projection.  
     193     * dest   - {<OpenLayers.Projection>} Destination projection.  
     194     * 
     195     * Returns: 
     196     * {<OpenLayers.Layer.Markers>} Itself, for use in chaining operations. 
     197     */ 
     198    transform: function(source, dest) { 
     199        for(var i=0; i < this.markers.length; i++) { 
     200            var marker = this.markers[i]; 
     201            marker.transform(source, dest); 
     202        } 
     203        this.redraw(); 
     204        return this; 
     205    }, 
    187206 
    188207    CLASS_NAME: "OpenLayers.Layer.Markers" 
  • sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/Vector.js

    r6833 r6888  
    494494    }, 
    495495     
     496    /* APIMethod: transform 
     497     * Transform the Vector layer from source to dest projection.  
     498     * 
     499     * Parameters:  
     500     * source - {<OpenLayers.Projection>} Source projection.  
     501     * dest   - {<OpenLayers.Projection>} Destination projection.  
     502     * 
     503     * Returns: 
     504     * {<OpenLayers.Layer.Markers>} Itself, for use in chaining operations. 
     505     */ 
     506    transform: function(source, dest) { 
     507        for(var i=0; i < this.features.length; i++) { 
     508            var feature = this.features[i]; 
     509            feature.geometry.transform(source, dest); 
     510        } 
     511        this.redraw(); 
     512        return this; 
     513    }, 
     514     
    496515    /** 
    497516     * Unselect the selected features 
  • sandbox/edgemaster/openlayers/lib/OpenLayers/Map.js

    r6833 r6888  
    973973        if (this.baseLayer) { 
    974974            oldExtent = this.baseLayer.getExtent(); 
     975            oldProjection = this.getProjectionObject(); 
    975976        } 
    976977 
     
    10031004                        ? oldExtent.getCenterLonLat() 
    10041005                        : center; 
     1006                         
     1007                    // Convert centre point to new layer projection - so we can 
     1008                    // maintain roughly the same view 
     1009                    if(!oldProjection.equals(this.getProjectionObject())) { 
     1010                        newCenter.transform(oldProjection, this.getProjectionObject()); 
     1011                        oldExtent.transform(oldProjection, this.getProjectionObject()); 
     1012                        vectorLayers = this.getLayersBy("isVector", true); 
     1013                        for (l = 0; l < vectorLayers.length; l++) { 
     1014                            vectorLayers[l].transform(oldProjection, this.getProjectionObject()); 
     1015                        } 
     1016                    } 
    10051017 
    10061018                    //the new zoom will either come from the old Extent or  
  • sandbox/edgemaster/openlayers/lib/OpenLayers/Marker.js

    r5614 r6888  
    182182    setUrl: function(url) { 
    183183        this.icon.setUrl(url); 
    184     },     
     184    }, 
     185     
     186    /* APIMethod: transform 
     187     * Transform the Marker object from source to dest projection.  
     188     * 
     189     * Parameters:  
     190     * source  - {<OpenLayers.Projection>} Source projection.  
     191     * dest    - {<OpenLayers.Projection>} Destination projection. 
     192     * 
     193     * Returns: 
     194     * {<OpenLayers.Marker>} Itself, for use in chaining operations. 
     195     */ 
     196    transform: function(source, dest) { 
     197        this.lonlat.transform(source, dest); 
     198        return this; 
     199    }, 
    185200 
    186201    /**