Skip to content

Instantly share code, notes, and snippets.

View pixelbreaker's full-sized avatar
🏩
rm -rf /

Gabes Mak pixelbreaker

🏩
rm -rf /
View GitHub Profile
@pixelbreaker
pixelbreaker / leaflet-bing-ordnance-survey.js
Last active November 3, 2015 12:41 — forked from alexnorton/leaflet-bing-ordnance-survey.js
Use Bing Maps Ordnance Survey tiles as a Leaflet TileLayer
var BingLayer = L.TileLayer.extend({
getTileUrl: function (tilePoint) {
this._adjustTilePoint(tilePoint);
return L.Util.template(this._url, {
s: this._getSubdomain(tilePoint),
q: this._quadKey(tilePoint.x, tilePoint.y, this._getZoomForUrl())
});
},
_quadKey: function (x, y, z) {
var quadKey = [];