Add serviceVersion property to Layer.TMS. (see #1023)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@4521 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2007-09-28 18:13:55 +00:00
parent 8c003733cf
commit af2f5b6577
2 changed files with 14 additions and 2 deletions

View File

@@ -13,6 +13,12 @@
*/
OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
/**
* APIProperty: serviceVersion
* {String}
*/
serviceVersion: "1.0.0",
/**
* APIProperty: isBaseLayer
* {Boolean}
@@ -91,7 +97,7 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
var x = Math.round((bounds.left - this.tileOrigin.lon) / (res * this.tileSize.w));
var y = Math.round((bounds.bottom - this.tileOrigin.lat) / (res * this.tileSize.h));
var z = this.map.getZoom();
var path = "1.0.0" + "/" + this.layername + "/" + z + "/" + x + "/" + y + "." + this.type;
var path = this.serviceVersion + "/" + this.layername + "/" + z + "/" + x + "/" + y + "." + this.type;
var url = this.url;
if (url instanceof Array) {
url = this.selectUrl(path, url);