Changeset 6888
- Timestamp:
- 04/13/08 11:20:48 (5 months ago)
- Files:
-
- sandbox/edgemaster/openlayers/lib/OpenLayers.js (modified) (1 diff)
- sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/Markers.js (modified) (1 diff)
- sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/OpenSpace.js (added)
- sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/Vector.js (modified) (1 diff)
- sandbox/edgemaster/openlayers/lib/OpenLayers/Map.js (modified) (2 diffs)
- sandbox/edgemaster/openlayers/lib/OpenLayers/Marker.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/edgemaster/openlayers/lib/OpenLayers.js
r6818 r6888 119 119 "OpenLayers/Layer/TMS.js", 120 120 "OpenLayers/Layer/TileCache.js", 121 "OpenLayers/Layer/OpenSpace.js", 121 122 "OpenLayers/Popup/Anchored.js", 122 123 "OpenLayers/Popup/AnchoredBubble.js", sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/Markers.js
r6833 r6888 185 185 return maxExtent; 186 186 }, 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 }, 187 206 188 207 CLASS_NAME: "OpenLayers.Layer.Markers" sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/Vector.js
r6833 r6888 494 494 }, 495 495 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 496 515 /** 497 516 * Unselect the selected features sandbox/edgemaster/openlayers/lib/OpenLayers/Map.js
r6833 r6888 973 973 if (this.baseLayer) { 974 974 oldExtent = this.baseLayer.getExtent(); 975 oldProjection = this.getProjectionObject(); 975 976 } 976 977 … … 1003 1004 ? oldExtent.getCenterLonLat() 1004 1005 : 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 } 1005 1017 1006 1018 //the new zoom will either come from the old Extent or sandbox/edgemaster/openlayers/lib/OpenLayers/Marker.js
r5614 r6888 182 182 setUrl: function(url) { 183 183 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 }, 185 200 186 201 /**
