Changeset 7013
- Timestamp:
- 04/25/08 21:32:39 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/Google.js
r6492 r7013 190 190 */ 191 191 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 } 193 212 }, 194 213 sandbox/edgemaster/openlayers/lib/OpenLayers/Map.js
r7012 r7013 1014 1014 newCenter.transform(oldProjection, newProjection); 1015 1015 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)) { 1017 1028 // Also convert vector layers - assuming they are in the 1018 1029 // same projection as the original baseLayer - we cannot … … 1025 1036 } 1026 1037 } 1027 1028 //the new zoom will either come from the converted old1029 // Extent or from the current resolution of the map1030 var newZoom = (newExtent)1031 ? this.getZoomForExtent(newExtent, true)1032 : this.getZoomForResolution(this.resolution, true);1033 1034 // zoom and force zoom change1035 this.setCenter(newCenter, newZoom, false, true);1036 1038 } 1037 1039
