Changeset 4521
- Timestamp:
- 09/28/07 14:13:55 (1 year ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Layer/TMS.js (modified) (2 diffs)
- trunk/openlayers/tests/Layer/test_TMS.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Layer/TMS.js
r4223 r4521 13 13 */ 14 14 OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, { 15 16 /** 17 * APIProperty: serviceVersion 18 * {String} 19 */ 20 serviceVersion: "1.0.0", 15 21 16 22 /** … … 92 98 var y = Math.round((bounds.bottom - this.tileOrigin.lat) / (res * this.tileSize.h)); 93 99 var z = this.map.getZoom(); 94 var path = "1.0.0"+ "/" + this.layername + "/" + z + "/" + x + "/" + y + "." + this.type;100 var path = this.serviceVersion + "/" + this.layername + "/" + z + "/" + x + "/" + y + "." + this.type; 95 101 var url = this.url; 96 102 if (url instanceof Array) { trunk/openlayers/tests/Layer/test_TMS.html
r4381 r4521 120 120 function test_10_Layer_TMS_getURL(t) { 121 121 122 t.plan( 2);122 t.plan(3); 123 123 124 124 var map = new OpenLayers.Map('map', options); … … 129 129 var tileurl = layer.getURL(new OpenLayers.Bounds(3.515625,45,4.21875,45.703125)); 130 130 t.eq(tileurl, "http://labs.metacarta.com/wms-c/Basic.py/1.0.0/basic/9/261/192.png", "Tile URL is correct"); 131 132 var layer2 = layer.clone(); 133 layer2.serviceVersion = "1.2.3"; 134 map.addLayer(layer2); 135 tileurl = layer2.getURL(new OpenLayers.Bounds(3.515625,45,4.21875,45.703125)); 136 t.eq(tileurl, "http://labs.metacarta.com/wms-c/Basic.py/1.2.3/basic/9/261/192.png", "TMS serviceVersion is correct"); 131 137 132 138 layer.url = ["http://tilecache1/", "http://tilecache2/", "http://tilecache3/"];
