Leaflet/Leaflet — pull request #1554 by olegsmith (2013-03-28 10:52:55+00:00)
Title: Support functions in L.Util.template

Look at hash function in Wikimapia
L.tileLayer('http://{s}{hash}.wikimapia.org/?x={x}&y={y}&zoom={z}&r=7071412&type=hybrid&lng=1', {
hash: function (data) {
return data.x % 4 + (data.y % 4) *4;
}
, subdomains : 'i'
, maxZoom: 18
, attribution: 'Wikimapia.org'
}).addTo(map);

http://olegsmith.github.com/leaflet.wikimapia/