Support ability to add a tile layer below all others for TileLayer.WMS

This commit is contained in:
Bryan McBride 2012-02-13 10:04:23 -05:00
parent fdde989f05
commit d5660ef6ca

View File

@ -25,11 +25,11 @@ L.TileLayer.WMS = L.TileLayer.extend({
L.Util.setOptions(this, options); L.Util.setOptions(this, options);
}, },
onAdd: function (map) { onAdd: function (map, insertAtTheBottom) {
var projectionKey = (parseFloat(this.wmsParams.version) >= 1.3 ? 'crs' : 'srs'); var projectionKey = (parseFloat(this.wmsParams.version) >= 1.3 ? 'crs' : 'srs');
this.wmsParams[projectionKey] = map.options.crs.code; this.wmsParams[projectionKey] = map.options.crs.code;
L.TileLayer.prototype.onAdd.call(this, map); L.TileLayer.prototype.onAdd.call(this, map, insertAtTheBottom);
}, },
getTileUrl: function (/*Point*/ tilePoint, /*Number*/ zoom)/*-> String*/ { getTileUrl: function (/*Point*/ tilePoint, /*Number*/ zoom)/*-> String*/ {