Ticket #2903 (closed bug: duplicate)

Opened 3 years ago

Last modified 3 years ago

addTile: don't set the deprecated url param

Reported by: fredj Owned by: tschaub
Priority: trivial Milestone: 2.11 Release
Component: Layer.TileCache Version: SVN
Keywords: Cc:
State: Review

Description

In OpenLayers.Layer.TileCache.addTile() the url is computed and passed to the OpenLayers.Tile.Image constructor but this parameter is deprecated.

The following patch removes the url computation:

Index: lib/OpenLayers/Layer/TileCache.js
===================================================================
--- lib/OpenLayers/Layer/TileCache.js	(revision 10860)
+++ lib/OpenLayers/Layer/TileCache.js	(working copy)
@@ -157,9 +157,8 @@
      * {<OpenLayers.Tile.Image>} The added <OpenLayers.Tile.Image>
      */
     addTile:function(bounds, position) {
-        var url = this.getURL(bounds);
         return new OpenLayers.Tile.Image(this, position, bounds, 
-                                             url, this.tileSize);
+                                         null, this.tileSize);
     },
     
     CLASS_NAME: "OpenLayers.Layer.TileCache"

Tests still pass, please review.

Attachments

2903.0.patch Download (1.2 KB) - added by fredj 3 years ago.
TileCache and KaMap: don't pass the deprecated url param

Change History

Changed 3 years ago by fredj

TileCache and KaMap: don't pass the deprecated url param

Changed 3 years ago by fredj

  • status changed from new to closed
  • resolution set to duplicate

replaced by #2904

Note: See TracTickets for help on using tickets.