Ticket #1076: tileOrigin.patch
| File tileOrigin.patch, 1.2 kB (added by euzuro, 11 months ago) |
|---|
-
lib/OpenLayers/Layer/TileCache.js
old new 22 22 */ 23 23 isBaseLayer: true, 24 24 25 /**26 * APIProperty: tileOrigin27 * {<OpenLayers.LonLat>} Location of the tile lattice origin. Default is28 * bottom left of the maxExtent.29 */30 tileOrigin: null,31 32 25 /** 33 26 * APIProperty: format 34 27 * {String} Mime type of the images returned. Default is image/png. … … 147 140 url, this.tileSize); 148 141 }, 149 142 150 /**151 * Method: setMap152 * When the layer is added to a map, then we can fetch our origin153 * (if we don't have one.)154 *155 * Parameters:156 * map - {<OpenLayers.Map>}157 */158 setMap: function(map) {159 OpenLayers.Layer.Grid.prototype.setMap.apply(this, arguments);160 if (!this.tileOrigin) {161 this.tileOrigin = new OpenLayers.LonLat(this.map.maxExtent.left,162 this.map.maxExtent.bottom);163 }164 },165 166 143 CLASS_NAME: "OpenLayers.Layer.TileCache" 167 144 });
