UNPKG

@itwin/core-frontend

Version:
34 lines 1.82 kB
"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("../../../../tile/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}`; } /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [addAttributions] instead. */ 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") })); } } async addAttributions(cards, _vp) { // eslint-disable-next-line @typescript-eslint/no-deprecated return Promise.resolve(this.addLogoCards(cards)); } } exports.AzureMapsLayerImageryProvider = AzureMapsLayerImageryProvider; //# sourceMappingURL=AzureMapsLayerImageryProvider.js.map