Ticket #1249: OpenLayers.Map.patch
| File OpenLayers.Map.patch, 1.5 kB (added by openlayers, 8 months ago) |
|---|
-
Map.js
old new 836 836 var oldExtent = null; 837 837 if (this.baseLayer) { 838 838 oldExtent = this.baseLayer.getExtent(); 839 oldProjection = this.getProjectionObject(); 839 840 } 840 841 841 842 if (newBaseLayer != this.baseLayer) { … … 866 867 var newCenter = (oldExtent) 867 868 ? oldExtent.getCenterLonLat() 868 869 : center; 870 871 if(!oldProjection.equals(this.getProjectionObject())) { 872 newCenter.transform(oldProjection, this.getProjectionObject()); 873 oldExtent.transform(oldProjection, this.getProjectionObject()); 874 } 869 875 870 876 //the new zoom will either come from the old Extent or 871 877 // from the current resolution of the map -
Layer/SphericalMercator.js
old new 128 128 }, 129 129 130 130 /** 131 * Method: project Forward131 * Method: projectInverse 132 132 * Given an object with x and y properties in Spherical Mercator, modify 133 133 * the x,y properties on the object to be the unprojected coordinates. 134 134 *
