"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module Tiles
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.AzureMapsLayerImageryProvider = void 0;
const IModelApp_1 = require("../../../IModelApp");
const internal_1 = require("../../internal");
/** @internal */
class AzureMapsLayerImageryProvider extends internal_1.MapLayerImageryProvider {
    constructor(settings) { super(settings, true); }
    // construct the Url from the desired Tile
    async constructUrl(y, x, zoom) {
        if (!this._settings.accessKey)
            return "";
        return `${this._settings.url}&${this._settings.accessKey.key}=${this._settings.accessKey.value}&api-version=2.0&zoom=${zoom}&x=${x}&y=${y}`;
    }
    addLogoCards(cards) {
        if (!cards.dataset.azureMapsLogoCard) {
            cards.dataset.azureMapsLogoCard = "true";
            cards.appendChild(IModelApp_1.IModelApp.makeLogoCard({ heading: "Azure Maps", notice: IModelApp_1.IModelApp.localization.getLocalizedString("iModelJs:BackgroundMap.AzureMapsCopyright") }));
        }
    }
}
exports.AzureMapsLayerImageryProvider = AzureMapsLayerImageryProvider;
//# sourceMappingURL=AzureMapsLayerImageryProvider.js.map