Changeset 6461
- Timestamp:
- 03/07/08 17:49:39 (9 months ago)
- Files:
-
- sandbox/euzuro/pop/examples/animated_panning.html (modified) (3 diffs)
- sandbox/euzuro/pop/examples/events.html (copied) (copied from trunk/openlayers/examples/events.html)
- sandbox/euzuro/pop/examples/transition.html (copied) (copied from trunk/openlayers/examples/transition.html)
- sandbox/euzuro/pop/examples/wfs-reprojection.html (copied) (copied from trunk/openlayers/examples/wfs-reprojection.html)
- sandbox/euzuro/pop/lib/OpenLayers/Ajax.js (modified) (4 diffs)
- sandbox/euzuro/pop/lib/OpenLayers/BaseTypes/Bounds.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Control.js (modified) (4 diffs)
- sandbox/euzuro/pop/lib/OpenLayers/Control/ModifyFeature.js (modified) (4 diffs)
- sandbox/euzuro/pop/lib/OpenLayers/Control/Navigation.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Control/NavigationHistory.js (modified) (3 diffs)
- sandbox/euzuro/pop/lib/OpenLayers/Control/Panel.js (modified) (2 diffs)
- sandbox/euzuro/pop/lib/OpenLayers/Control/ScaleLine.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Control/ZoomBox.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Events.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Format/JSON.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Geometry/Rectangle.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Handler/Click.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Handler/Hover.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Layer.js (modified) (4 diffs)
- sandbox/euzuro/pop/lib/OpenLayers/Layer/Google.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Layer/Grid.js (modified) (2 diffs)
- sandbox/euzuro/pop/lib/OpenLayers/Layer/MapGuide.js (modified) (3 diffs)
- sandbox/euzuro/pop/lib/OpenLayers/Layer/MapServer.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Layer/PointTrack.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Layer/TMS.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Layer/Text.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Layer/TileCache.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Layer/Vector.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Layer/WFS.js (modified) (2 diffs)
- sandbox/euzuro/pop/lib/OpenLayers/Layer/WMS.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Layer/WorldWind.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Map.js (modified) (7 diffs)
- sandbox/euzuro/pop/lib/OpenLayers/Popup.js (modified) (1 diff)
- sandbox/euzuro/pop/lib/OpenLayers/Tile.js (modified) (6 diffs)
- sandbox/euzuro/pop/lib/OpenLayers/Tile/Image.js (modified) (5 diffs)
- sandbox/euzuro/pop/lib/OpenLayers/Tile/WFS.js (modified) (2 diffs)
- sandbox/euzuro/pop/lib/OpenLayers/Tween.js (modified) (1 diff)
- sandbox/euzuro/pop/tests/Control/test_ModifyFeature.html (modified) (21 diffs)
- sandbox/euzuro/pop/tests/Handler/test_Click.html (modified) (2 diffs)
- sandbox/euzuro/pop/tests/Handler/test_Hover.html (modified) (2 diffs)
- sandbox/euzuro/pop/tests/Tile/test_WFS.html (modified) (4 diffs)
- sandbox/euzuro/pop/tests/manual/ajax.html (modified) (2 diffs)
- sandbox/euzuro/pop/tests/manual/tween.html (modified) (1 diff)
- sandbox/euzuro/pop/tests/test_Control.html (modified) (1 diff)
- sandbox/euzuro/pop/tests/test_Layer.html (modified) (1 diff)
- sandbox/euzuro/pop/tests/test_Map.html (modified) (1 diff)
- sandbox/euzuro/pop/tests/test_Tile.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/euzuro/pop/examples/animated_panning.html
r6253 r6461 5 5 <style type="text/css"> 6 6 #map { 7 width: 512px; 8 height: 256px; 9 border: 1px solid black; 10 } 11 #map2 { 7 12 width: 512px; 8 13 height: 256px; … … 51 56 click.activate(); 52 57 map.addControl(new OpenLayers.Control.OverviewMap()); 58 59 map2 = new OpenLayers.Map('map2', {'panMethod': null} ); 60 layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 61 "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); 62 63 map2.addLayer(layer); 64 map2.zoomToMaxExtent(); 53 65 } 54 66 … … 77 89 <div id="map"></div> 78 90 <div id="docs"> 79 This is an example of transition effects. If the new random center is in the current extent, the map will pan smoothly. <br />91 <p>This is an example of transition effects. If the new random center is in the current extent, the map will pan smoothly. <br /> 80 92 The random selection will continue until you press it again. Additionally, you can single click in the map to pan smoothly 81 93 to that area, or use the pan control to pan smoothly. 82 94 </p> 83 95 </div> 84 96 <button onclick="setCenterInterval()">Start/stop random recenter</button> 97 <div id="map2"></div> 98 <div> 99 <p>To turn off Animated Panning, create a map with an panMethod set to 100 null. </p> 101 </div> 85 102 </body> 86 103 </html> sandbox/euzuro/pop/lib/OpenLayers/Ajax.js
r6325 r6461 54 54 * 55 55 * Returns: 56 * { OpenLayers.Ajax.Request} The request object. To abort loading, call57 * request. transport.abort();56 * {XMLHttpRequest} The request object. To abort loading, call 57 * request.abort(). 58 58 */ 59 59 OpenLayers.loadURL = function(uri, params, caller, … … 67 67 68 68 // from prototype.js 69 returnnew OpenLayers.Ajax.Request(69 var request = new OpenLayers.Ajax.Request( 70 70 uri, 71 71 { … … 76 76 } 77 77 ); 78 return request.transport; 78 79 }; 79 80 … … 547 548 548 549 /** 549 * Class: OpenLayers.Ajax.Request 550 * 551 * Inherit: 552 * - <OpenLayers.Ajax.Base> 550 * Class: OpenLayers.Ajax.Response 553 551 */ 554 552 OpenLayers.Ajax.Response = OpenLayers.Class({ sandbox/euzuro/pop/lib/OpenLayers/BaseTypes/Bounds.js
r6325 r6461 460 460 var ll = OpenLayers.Projection.transform( 461 461 {'x': this.left, 'y': this.bottom}, source, dest); 462 var lr = OpenLayers.Projection.transform( 463 {'x': this.right, 'y': this.bottom}, source, dest); 464 var ul = OpenLayers.Projection.transform( 465 {'x': this.left, 'y': this.top}, source, dest); 462 466 var ur = OpenLayers.Projection.transform( 463 467 {'x': this.right, 'y': this.top}, source, dest); 464 this.left = ll.x;465 this.bottom = ll.y;466 this.right = ur.x;467 this.top = ur.y;468 this.left = Math.min(ll.x, ul.x); 469 this.bottom = Math.min(ll.y, lr.y); 470 this.right = Math.max(lr.x, ur.x); 471 this.top = Math.max(ul.y, ur.y); 468 472 return this; 469 473 }, sandbox/euzuro/pop/lib/OpenLayers/Control.js
r6253 r6461 105 105 handler: null, 106 106 107 /** 108 * APIProperty: eventListeners 109 * {Object} If set as an option at construction, the eventListeners 110 * object will be registered with <OpenLayers.Events.on>. Object 111 * structure must be a listeners object as shown in the example for 112 * the events.on method. 113 */ 114 eventListeners: null, 115 107 116 /** 108 117 * Property: events … … 156 165 157 166 this.events = new OpenLayers.Events(this, null, this.EVENT_TYPES); 167 if(this.eventListeners instanceof Object) { 168 this.events.on(this.eventListeners); 169 } 158 170 this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); 159 171 }, … … 167 179 destroy: function () { 168 180 if(this.events) { 181 if(this.eventListeners) { 182 this.events.un(this.eventListeners); 183 } 169 184 this.events.destroy(); 170 185 this.events = null; 171 186 } 187 this.eventListeners = null; 188 172 189 // eliminate circular references 173 190 if (this.handler) { … … 231 248 this.position = px.clone(); 232 249 } 233 this.moveTo(this.position); 250 this.moveTo(this.position); 234 251 return this.div; 235 252 }, sandbox/euzuro/pop/lib/OpenLayers/Control/ModifyFeature.js
r6325 r6461 290 290 this.dragControl.activate(); 291 291 this.onModificationStart(this.feature); 292 this.layer.events.triggerEvent("beforefeaturemodified", 293 {feature: this.feature}); 292 294 }, 293 295 … … 316 318 this.dragControl.deactivate(); 317 319 this.onModificationEnd(object.feature); 320 this.layer.events.triggerEvent("afterfeaturemodified", 321 {feature: object.feature}); 318 322 }, 319 323 … … 429 433 this.resetVertices(); 430 434 this.onModification(this.feature); 435 this.layer.events.triggerEvent("featuremodified", 436 {feature: this.feature}); 431 437 }, 432 438 … … 501 507 this.resetVertices(); 502 508 this.onModification(this.feature); 509 this.layer.events.triggerEvent("featuremodified", 510 {feature: this.feature}); 503 511 } 504 512 } sandbox/euzuro/pop/lib/OpenLayers/Control/Navigation.js
r6127 r6461 130 130 * Parameters: 131 131 * evt - {Event} 132 * deltaZ - {Integer} 132 133 */ 133 134 wheelChange: function(evt, deltaZ) { sandbox/euzuro/pop/lib/OpenLayers/Control/NavigationHistory.js
r6253 r6461 111 111 * Property: restoring 112 112 * {Boolean} Currently restoring a history state. This is set to true 113 * before calli lng restore and set to false after restore returns.113 * before calling restore and set to false after restore returns. 114 114 */ 115 115 restoring: false, 116 116 117 117 /** 118 118 * Constructor: OpenLayers.Control.NavigationHistory … … 140 140 displayClass: this.displayClass + "Previous" 141 141 }; 142 if(options) { 143 OpenLayers.Util.extend(previousOptions, options.previousOptions); 144 } 142 OpenLayers.Util.extend(previousOptions, this.previousOptions); 145 143 this.previous = new OpenLayers.Control.Button(previousOptions); 146 144 … … 149 147 displayClass: this.displayClass + "Next" 150 148 }; 151 if(options) { 152 OpenLayers.Util.extend(nextOptions, options.nextOptions); 153 } 149 OpenLayers.Util.extend(nextOptions, this.nextOptions); 154 150 this.next = new OpenLayers.Control.Button(nextOptions); 155 151 sandbox/euzuro/pop/lib/OpenLayers/Control/Panel.js
r6253 r6461 149 149 } 150 150 for (var i = 0; i < this.controls.length; i++) { 151 if (this.controls[i] == control) { 152 control.activate(); 153 } else { 151 if (this.controls[i] != control) { 154 152 if (this.controls[i].type != OpenLayers.Control.TYPE_TOGGLE) { 155 153 this.controls[i].deactivate(); … … 157 155 } 158 156 } 157 control.activate(); 159 158 }, 160 159 sandbox/euzuro/pop/lib/OpenLayers/Control/ScaleLine.js
r6253 r6461 5 5 /** 6 6 * @requires OpenLayers/Control.js 7 * 7 */ 8 9 /** 8 10 * Class: OpenLayers.Control.ScaleLine 9 11 * Display a small line indicator representing the current map scale on the map. sandbox/euzuro/pop/lib/OpenLayers/Control/ZoomBox.js
r5796 r6461 55 55 var zoomFactor = Math.min((this.map.size.h / pixHeight), 56 56 (this.map.size.w / pixWidth)); 57 var extent = map.getExtent();57 var extent = this.map.getExtent(); 58 58 var center = this.map.getLonLatFromPixel( 59 59 position.getCenterPixel()); sandbox/euzuro/pop/lib/OpenLayers/Events.js
r6253 r6461 652 652 evt.object = this.object; 653 653 evt.element = this.element; 654 if(!evt.type) { 655 evt.type = type; 656 } 654 657 655 658 // execute all callbacks registered for specified type sandbox/euzuro/pop/lib/OpenLayers/Format/JSON.js
r6136 r6461 287 287 * Transform a string into a JSON string. 288 288 * 289 * Parameters 289 * Parameters: 290 290 * string - {String} The string to be serialized 291 291 * sandbox/euzuro/pop/lib/OpenLayers/Geometry/Rectangle.js
r5614 r6461 9 9 /** 10 10 * Class: OpenLayers.Geometry.Rectangle 11 * A Rectangle is a simple geometry. It is specified by a point (x and y) 12 * and dimensions (width and height), all of which are directly accessible 13 * as properties. 11 * This class is *not supported*, and probably isn't what you're looking for. 12 * Instead, most users probably want something like: 13 * (code) 14 * var poly = new OpenLayers.Bounds(0,0,10,10).toGeometry(); 15 * (end) 16 * This will create a rectangular Polygon geometry. 14 17 * 15 18 * Inherits: sandbox/euzuro/pop/lib/OpenLayers/Handler/Click.js
r6136 r6461 160 160 } else { 161 161 // set the timer, send evt only if single is true 162 var clickEvent = this.single ? evt : null; 162 //use a clone of the event object because it will no longer 163 //be a valid event object in IE in the timer callback 164 var clickEvent = this.single ? 165 OpenLayers.Util.extend({}, evt) : null; 163 166 this.timerId = window.setTimeout( 164 167 OpenLayers.Function.bind(this.delayedCall, this, clickEvent), sandbox/euzuro/pop/lib/OpenLayers/Handler/Hover.js
r6136 r6461 87 87 this.callback('move', [evt]); 88 88 this.px = evt.xy; 89 // clone the evt so original properties can be accessed even 90 // if the browser deletes them during the delay 91 evt = OpenLayers.Util.extend({}, evt); 89 92 this.timerId = window.setTimeout( 90 93 OpenLayers.Function.bind(this.delayedCall, this, evt), sandbox/euzuro/pop/lib/OpenLayers/Layer.js
r6402 r6461 140 140 141 141 /** 142 * APIProperty: eventListeners 143 * {Object} If set as an option at construction, the eventListeners 144 * object will be registered with <OpenLayers.Events.on>. Object 145 * structure must be a listeners object as shown in the example for 146 * the events.on method. 147 */ 148 eventListeners: null, 149 150 /** 142 151 * APIProperty: gutter 143 152 * {Integer} Determines the width (in pixels) of the gutter around image … … 249 258 wrapDateLine: false, 250 259 260 /** 261 * APIProperty: transitionEffect 262 * {String} The transition effect to use when the map is panned or 263 * zoomed. 264 * 265 * There are currently two supported values: 266 * - *null* No transition effect (the default). 267 * - *resize* Existing tiles are resized on zoom to provide a visual 268 * effect of the zoom having taken place immediately. As the 269 * new tiles become available, they are drawn over top of the 270 * resized tiles. 271 */ 272 transitionEffect: null, 273 274 /** 275 * Property: SUPPORTED_TRANSITIONS 276 * {Array} An immutable (that means don't change it!) list of supported 277 * transitionEffect values. 278 */ 279 SUPPORTED_TRANSITIONS: ['resize'], 251 280 252 281 /** … … 273 302 this.events = new OpenLayers.Events(this, this.div, 274 303 this.EVENT_TYPES); 304 if(this.eventListeners instanceof Object) { 305 this.events.on(this.eventListeners); 306 } 307 275 308 } 276 309 … … 303 336 304 337 if (this.events) { 338 if(this.eventListeners) { 339 this.events.un(this.eventListeners); 340 } 305 341 this.events.destroy(); 306 342 } 343 this.eventListeners = null; 307 344 this.events = null; 308 345 }, sandbox/euzuro/pop/lib/OpenLayers/Layer/Google.js
r6325 r6461 81 81 * 82 82 * Parameters: 83 * name - {String} 84 * options - {Object} 83 * name - {String} A name for the layer. 84 * options - {Object} An optional object whose properties will be set 85 * on the layer. 85 86 */ 86 87 initialize: function(name, options) { sandbox/euzuro/pop/lib/OpenLayers/Layer/Grid.js
r6253 r6461 511 511 * Parameters 512 512 * bounds - {<OpenLayers.Bounds>} 513 * position - {<OpenLayers.Pixel>} 513 514 * 514 515 * Returns: … … 695 696 /** 696 697 * Method: onMapResize 697 * For singleTile layers, this will replace the tile withthe698 * a new one with updated tileSize and extent.698 * For singleTile layers, this will set a new tile size according to the 699 * dimensions of the map pane. 699 700 */ 700 701 onMapResize: function() { 701 702 if (this.singleTile) { 702 this.clearGrid();703 703 this.setTileSize(); 704 704 } sandbox/euzuro/pop/lib/OpenLayers/Layer/MapGuide.js
r6402 r6461 6 6 * @requires OpenLayers/Ajax.js 7 7 * @requires OpenLayers/Layer/Grid.js 8 * 8 */ 9 10 /** 9 11 * Class: OpenLayers.Layer.MapGuide 10 12 * Instances of OpenLayers.Layer.MapGuide are used to display … … 48 50 format: 'PNG', 49 51 locale: 'en', 52 clip: '1', 50 53 version: '1.0.0' 51 54 }, … … 150 153 * Parameters: 151 154 * bounds - {<OpenLayers.Bounds>} 155 * position - {<OpenLayers.Pixel>} 152 156 * 153 157 * Returns: sandbox/euzuro/pop/lib/OpenLayers/Layer/MapServer.js
r5622 r6461 86 86 * Parameters: 87 87 * bounds - {<OpenLayers.Bounds>} 88 * position - {<OpenLayers.Pixel>} 88 89 * 89 90 * Returns: sandbox/euzuro/pop/lib/OpenLayers/Layer/PointTrack.js
r5733 r6461 5 5 /** 6 6 * @requires OpenLayers/Layer/Vector.js 7 * 7 */ 8 9 /** 8 10 * Class: OpenLayers.Layer.PointTrack 9 11 * Vector layer to display ordered point features as a line, creating one sandbox/euzuro/pop/lib/OpenLayers/Layer/TMS.js
r5950 r6461 113 113 * Parameters: 114 114 * bounds - {<OpenLayers.Bounds>} 115 * position - {<OpenLayers.Pixel>} 115 116 * 116 117 * Returns: sandbox/euzuro/pop/lib/OpenLayers/Layer/Text.js
r5828 r6461 174 174 if (feature.style.graphicXOffset 175 175 && feature.style.graphicYOffset) { 176 iconOffset = new OpenLayers. Size(176 iconOffset = new OpenLayers.Pixel( 177 177 feature.style.graphicXOffset, 178 178 feature.style.graphicYOffset); sandbox/euzuro/pop/lib/OpenLayers/Layer/TileCache.js
r6136 r6461 148 148 * Parameters: 149 149 * bounds - {<OpenLayers.Bounds>} 150 * position - {<OpenLayers.Pixel>} 150 151 * 151 152 * Returns: sandbox/euzuro/pop/lib/OpenLayers/Layer/Vector.js
r6402 r6461 52 52 * Listeners will receive an object with a *feature* property 53 53 * referencing the unselected feature. 54 * - *beforefeaturemodified* Triggered when a feature is selected to 55 * be modified. Listeners will receive an object with a *feature* 56 * property referencing the selected feature. 57 * - *featuremodified* Triggered when a feature has been modified. 58 * Listeners will receive an object with a *feature* property referencing 59 * the modified feature. 60 * - *afterfeaturemodified* Triggered when a feature is finished being modified. 61 * Listeners will receive an object with a *feature* property referencing 62 * the modified feature. 54 63 */ 55 64 EVENT_TYPES: ["beforefeatureadded", "featureadded", 56 "featuresadded", "featureselected", "featureunselected"], 65 "featuresadded", "featureselected", "featureunselected", 66 "beforefeaturemodified", "featuremodified", "afterfeaturemodified"], 57 67 58 68 /** sandbox/euzuro/pop/lib/OpenLayers/Layer/WFS.js
r6325 r6461 278 278 var params = {BBOX: this.encodeBBOX ? tileBounds.toBBOX() 279 279 : tileBounds.toArray()}; 280 281 if (this.map && !this.projection.equals(this.map.getProjectionObject())) { 282 var projectedBounds = tileBounds.clone(); 283 projectedBounds.transform(this.map.getProjectionObject(), 284 this.projection); 285 params.BBOX = this.encodeBBOX ? projectedBounds.toBBOX() 286 : projectedBounds.toArray(); 287 } 288 280 289 url += "&" + OpenLayers.Util.getParameterString(params); 281 290 … … 435 444 commit: function() { 436 445 if (!this.writer) { 437 this.writer = new OpenLayers.Format.WFS({},this); 446 var options = {}; 447 if (this.map && !this.projection.equals(this.map.getProjectionObject())) { 448 options.externalProjection = this.projection; 449 options.internalProjection = this.map.getProjectionObject(); 450 } 451 452 this.writer = new OpenLayers.Format.WFS(options,this); 438 453 } 439 454 sandbox/euzuro/pop/lib/OpenLayers/Layer/WMS.js
r6253 r6461 172 172 * Parameters: 173 173 * bounds - {<OpenLayers.Bounds>} 174 * position - {<OpenLayers.Pixel>} 174 175 * 175 176 * Returns: sandbox/euzuro/pop/lib/OpenLayers/Layer/WorldWind.js
r5614 r6461 65 65 /** 66 66 * Method: addTile 67 * 68 * Parameters: 69 * bounds - {<OpenLayers.Bounds>} 70 * position - {<OpenLayers.Pixel>} 71 * 72 * Returns: 73 * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image 67 74 */ 68 75 addTile:function(bounds,position) { sandbox/euzuro/pop/lib/OpenLayers/Map.js
r6402 r6461 95 95 * to be set to a value between one of the values in the resolutions 96 96 * array. Default is false. 97 * 98 * When fractionalZoom is set to true, it is possible to zoom to 99 * an arbitrary extent. This requires a base layer from a source 100 * that supports requests for arbitrary extents (i.e. not cached 101 * tiles on a regular lattice). This means that fractionalZoom 102 * will not work with commercial layers (Google, Yahoo, VE), layers 103 * using TileCache, or any other pre-cached data sources. 104 * 105 * If you are using fractionalZoom, then you should also use 106 * <getResolutionForZoom> instead of layer.resolutions[zoom] as the 107 * former works for non-integer zoom levels. 97 108 */ 98 109 fractionalZoom: false, … … 326 337 panTween: null, 327 338 339 /** 340 * APIProperty: eventListeners 341 * {Object} If set as an option at construction, the eventListeners 342 * object will be registered with <OpenLayers.Events.on>. Object 343 * structure must be a listeners object as shown in the example for 344 * the events.on method. 345 */ 346 eventListeners: null, 347 348 /** 349 * Property: panMethod 350 * {Function} The Easing function to be used for tweening. Default is 351 * OpenLayers.Easing.Expo.easeOut. Setting this to 'null' turns off 352 * animated panning. 353 */ 354 panMethod: OpenLayers.Easing.Expo.easeOut, 355 328 356 /** 329 357 * Constructor: OpenLayers.Map … … 390 418 this.fallThrough); 391 419 this.updateSize(); 420 if(this.eventListeners instanceof Object) { 421 this.events.on(this.eventListeners); 422 } 392 423 393 424 // update the map size and location before the map moves … … 515 546 this.viewPortDiv = null; 516 547 548 if(this.eventListeners) { 549 this.events.un(this.eventListeners); 550 this.eventListeners = null; 551 } 517 552 this.events.destroy(); 518 553 this.events = null; … … 1318 1353 */ 1319 1354 panTo: function(lonlat) { 1320 if (this. getExtent().containsLonLat(lonlat)) {1355 if (this.panMethod && this.getExtent().containsLonLat(lonlat)) { 1321 1356 if (!this.panTween) { 1322 this.panTween = new OpenLayers.Tween( OpenLayers.Easing.Expo.easeOut);1357 this.panTween = new OpenLayers.Tween(this.panMethod); 1323 1358 } 1324 1359 var center = this.getCenter(); … … 1337 1372 }, this), 1338 1373 eachStep: OpenLayers.Function.bind(function(lonlat) { 1339 varlonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat);1374 lonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat); 1340 1375 this.moveTo(lonlat, this.zoom, { 1341 1376 'dragging': true, … … 1344 1379 }, this), 1345 1380 done: OpenLayers.Function.bind(function(lonlat) { 1346 varlonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat);1381 lonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat); 1347 1382 this.moveTo(lonlat, this.zoom, { 1348 1383 'noEvent': true sandbox/euzuro/pop/lib/OpenLayers/Popup.js
r6405 r6461 391 391 * Method: setBackgroundColor 392 392 * Sets the background color of the popup. 393 * 393 394 * Parameters: 394 395 * color - {String} the background color. eg "#FFBBBB" sandbox/euzuro/pop/lib/OpenLayers/Tile.js
r6325 r6461 81 81 isLoading: false, 82 82 83 /** 84 * Property: isBackBuffer 85 * {Boolean} Is this tile a back buffer tile? 86 */ 87 isBackBuffer: false, 88 89 /** 90 * Property: lastRatio 91 * {Float} Used in transition code only. This is the previous ratio 92 * of the back buffer tile resolution to the map resolution. Compared 93 * with the current ratio to determine if zooming occurred. 94 */ 95 lastRatio: 1, 96 97 /** 98 * Property: isFirstDraw 99 * {Boolean} Is this the first time the tile is being drawn? 100 * This is used to force resetBackBuffer to synchronize 101 * the backBufferTile with the foreground tile the first time 102 * the foreground tile loads so that if the user zooms 103 * before the layer has fully loaded, the backBufferTile for 104 * tiles that have been loaded can be used. 105 */ 106 isFirstDraw: true, 107 108 /** 109 * Property: backBufferTile 110 * {<OpenLayers.Tile>} A clone of the tile used to create transition 111 * effects when the tile is moved or changes resolution. 112 */ 113 backBufferTile: null, 114 83 115 /** TBD 3.0 -- remove 'url' from the list of parameters to the constructor. 84 116 * there is no need for the base tile class to have a url. … … 112 144 */ 113 145 destroy:function() { 146 if (OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS, 147 this.layer.transitionEffect) != -1) { 148 this.layer.events.unregister("loadend", this, this.resetBackBuffer); 149 this.events.unregister('loadend', this, this.resetBackBuffer); 150 } else { 151 this.events.unregister('loadend', this, this.showTile); 152 } 114 153 this.layer = null; 115 154 this.bounds = null; … … 119 158 this.events.destroy(); 120 159 this.events = null; 160 161 /* clean up the backBufferTile if it exists */ 162 if (this.backBufferTile) { 163 this.backBufferTile.destroy(); 164 this.backBufferTile = null; 165 } 121 166 }, 122 167 … … 157 202 */ 158 203 draw: function() { 159 160 //clear tile's contents and mark as not drawn161 this.clear();162 163 204 var maxExtent = this.layer.maxExtent; 164 205 var withinMaxExtent = (maxExtent && … … 167 208 // The only case where we *wouldn't* want to draw the tile is if the 168 209 // tile is outside its layer's maxExtent. 169 return (withinMaxExtent || this.layer.displayOutsideMaxExtent); 210 var drawTile = (withinMaxExtent || this.layer.displayOutsideMaxExtent); 211 212 if (OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS, this.layer.transitionEffect) != -1) { 213 if (drawTile) { 214 //we use a clone of this tile to create a double buffer for visual 215 //continuity. The backBufferTile is used to create transition 216 //effects while the tile in the grid is repositioned and redrawn 217 if (!this.backBufferTile) { 218 this.backBufferTile = this.clone(); 219 &n
