UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

139 lines (138 loc) 6.62 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends } from "tslib"; import { MapTileSource } from "./MapTileSource"; import { DependencyProperty } from "./DependencyProperty"; import { String_$type, Date_$type, markType } from "./type"; import { Uri } from "./Uri"; import { PropertyMetadata } from "./PropertyMetadata"; import { dateMinValue } from "./date"; import { stringReplace, stringIsNullOrEmpty } from "./string"; /** * @hidden */ var AzureMapsTileSource = /** @class */ /*@__PURE__*/ (function (_super) { __extends(AzureMapsTileSource, _super); function AzureMapsTileSource() { var _this = _super.call(this, 256 << 22, 256 << 22, 256, 256, 0) || this; _this.ac = "https://atlas.microsoft.com/map/tile?subscription-key={subscriptionKey}&api-version={apiVersion}&tilesetId={tilesetId}&zoom={zoom}&x={x}&y={y}"; _this.ab = null; return _this; } Object.defineProperty(AzureMapsTileSource.prototype, "apiKey", { get: function () { return this.c(AzureMapsTileSource.apiKeyProperty); }, set: function (a) { this.h(AzureMapsTileSource.apiKeyProperty, a); }, enumerable: false, configurable: true }); Object.defineProperty(AzureMapsTileSource.prototype, "cultureName", { get: function () { return this.c(AzureMapsTileSource.cultureNameProperty); }, set: function (a) { this.h(AzureMapsTileSource.cultureNameProperty, a); }, enumerable: false, configurable: true }); Object.defineProperty(AzureMapsTileSource.prototype, "apiVersion", { get: function () { return this.c(AzureMapsTileSource.apiVersionProperty); }, set: function (a) { this.h(AzureMapsTileSource.apiVersionProperty, a); }, enumerable: false, configurable: true }); Object.defineProperty(AzureMapsTileSource.prototype, "tilesetId", { get: function () { return this.c(AzureMapsTileSource.tilesetIdProperty); }, set: function (a) { this.h(AzureMapsTileSource.tilesetIdProperty, a); }, enumerable: false, configurable: true }); Object.defineProperty(AzureMapsTileSource.prototype, "localizedView", { get: function () { return this.c(AzureMapsTileSource.localizedViewProperty); }, set: function (a) { this.h(AzureMapsTileSource.localizedViewProperty, a); }, enumerable: false, configurable: true }); Object.defineProperty(AzureMapsTileSource.prototype, "timestamp", { get: function () { return this.c(AzureMapsTileSource.timestampProperty); }, set: function (a) { this.h(AzureMapsTileSource.timestampProperty, a); }, enumerable: false, configurable: true }); AzureMapsTileSource.prototype.x = function (a, b, c, d) { if (!this.z()) { d.clear(); return; } a -= 8; if (a > 0) { var e = this.ac; var f = this.tilesetId == null ? "microsoft.base.road" : this.tilesetId.toString(); e = stringReplace(e, "{subscriptionKey}", this.apiKey); e = stringReplace(e, "{apiVersion}", this.apiVersion); e = stringReplace(e, "{tilesetId}", f); e = stringReplace(e, "{zoom}", a.toString()); e = stringReplace(e, "{x}", b.toString()); e = stringReplace(e, "{y}", c.toString()); if (this.tilesetId != "microsoft.terra.main") { e = e + "&tileSize=256"; } if (!stringIsNullOrEmpty(this.ab)) { e = e + "&language=" + this.ab; } if (+(this.timestamp) != +(dateMinValue())) { e = e + "&timeStamp=" + (this.timestamp.toJSON()); } if (!stringIsNullOrEmpty(this.localizedView)) { e = e + "&view=" + this.localizedView; } d.add(new Uri(0, e)); } }; AzureMapsTileSource.prototype.z = function () { var a = true; return a; }; AzureMapsTileSource.ai = function (a, b) { var c = a; if ((b.f == AzureMapsTileSource.tilesetIdProperty) || (b.f == AzureMapsTileSource.apiKeyProperty) || (b.f == AzureMapsTileSource.cultureNameProperty) || (b.f == AzureMapsTileSource.localizedViewProperty) || (b.f == AzureMapsTileSource.timestampProperty) || (b.f == AzureMapsTileSource.apiVersionProperty)) { if (b.f == AzureMapsTileSource.cultureNameProperty) { c.ab = b.newValue; } c.y(0, 0, 0, 0); } }; AzureMapsTileSource.$t = markType(AzureMapsTileSource, 'AzureMapsTileSource', MapTileSource.$); AzureMapsTileSource.apiKeyProperty = DependencyProperty.i("ApiKey", String_$type, AzureMapsTileSource.$, new PropertyMetadata(2, null, AzureMapsTileSource.ai)); AzureMapsTileSource.cultureNameProperty = DependencyProperty.i("CultureName", String_$type, AzureMapsTileSource.$, new PropertyMetadata(2, null, AzureMapsTileSource.ai)); AzureMapsTileSource.apiVersionProperty = DependencyProperty.i("ApiVersion", String_$type, AzureMapsTileSource.$, new PropertyMetadata(2, "2024-04-01", AzureMapsTileSource.ai)); AzureMapsTileSource.tilesetIdProperty = DependencyProperty.i("TilesetId", String_$type, AzureMapsTileSource.$, new PropertyMetadata(2, null, AzureMapsTileSource.ai)); AzureMapsTileSource.localizedViewProperty = DependencyProperty.i("LocalizedView", String_$type, AzureMapsTileSource.$, new PropertyMetadata(2, null, AzureMapsTileSource.ai)); AzureMapsTileSource.timestampProperty = DependencyProperty.i("Timestamp", Date_$type, AzureMapsTileSource.$, new PropertyMetadata(2, dateMinValue(), AzureMapsTileSource.ai)); return AzureMapsTileSource; }(MapTileSource)); export { AzureMapsTileSource };