define(["require", "exports", "@syncfusion/ej2-base"], function (require, exports, ej2_base_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var BingMap = (function () {
function BingMap(maps) {
this.maps = maps;
}
BingMap.prototype.getBingMap = function (tile, key, type, language, imageUrl, subDomains) {
var quadKey = '';
var maxZoom = Math.min(this.maps.tileZoomLevel, parseInt(this.maxZoom, 10));
for (var i = maxZoom; i > 0; i--) {
var digit = 0;
var mask = 1 << (i - 1);
if ((tile.x & mask) !== 0) {
digit++;
}
if ((tile.y & mask) !== 0) {
digit += 2;
}
quadKey = quadKey + '' + digit;
}
if (!ej2_base_1.isNullOrUndefined(subDomains)) {
var subDomain = subDomains[Math.min(parseInt(quadKey.substr(quadKey.length - 1, 1), 10), subDomains.length)];
imageUrl = imageUrl.replace('{quadkey}', quadKey).replace('{subdomain}', subDomain);
return imageUrl += '&mkt=' + language + '&ur=IN&Key=' + key;
}
else {
return '';
}
};
BingMap.prototype.destroy = function () {
this.maps = null;
this.subDomains = [];
};
return BingMap;
}());
exports.BingMap = BingMap;
});
|