{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/providers/wmts/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-04-08 14:54:09\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\providers\\wmts\\index.ts\n */\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type { AnyObject, VcComponentInternalInstance, VcComponentPublicInstance, VcReadyObject, VcRectangle } from '@vue-cesium/utils/types'\nimport { useProviders } from '@vue-cesium/composables'\nimport {\n  url,\n  format,\n  clock,\n  times,\n  tileWidth,\n  tileHeight,\n  tilingScheme,\n  rectangle,\n  minimumLevel,\n  maximumLevel,\n  ellipsoid,\n  credit,\n  subdomains\n} from '@vue-cesium/utils/cesium-props'\nimport { kebabCase } from '@vue-cesium/utils/util'\nimport { providerEmits } from '@vue-cesium/utils/emits'\n\nexport const wmtsImageryProviderProps = {\n  ...url,\n  ...format,\n  layer: {\n    type: String,\n    required: true\n  },\n  wmtsStyle: {\n    type: String,\n    required: true\n  },\n  tileMatrixSetID: {\n    type: String,\n    required: true\n  },\n  tileMatrixLabels: Array,\n  ...clock,\n  ...times,\n  dimensions: Object,\n  ...tileWidth,\n  ...tileHeight,\n  ...tilingScheme,\n  ...rectangle,\n  ...minimumLevel,\n  ...maximumLevel,\n  ...ellipsoid,\n  ...credit,\n  ...subdomains\n}\nexport default defineComponent({\n  name: 'VcImageryProviderWmts',\n  props: wmtsImageryProviderProps,\n  emits: providerEmits,\n  setup(props, ctx) {\n    // state\n    const instance = getCurrentInstance() as VcComponentInternalInstance\n    instance.cesiumClass = 'WebMapTileServiceImageryProvider'\n    useProviders(props, ctx, instance)\n    return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || ''))\n  }\n})\n\nexport type VcImageryProviderWmtsProps = {\n  /**\n   * The base URL for the WMTS GetTile operation (for KVP-encoded requests) or the tile-URL template (for RESTful requests). The tile-URL template should contain the following variables: {style}, {TileMatrixSet}, {TileMatrix}, {TileRow}, {TileCol}. The first two are optional if actual values are hardcoded or not required by the server. The {s} keyword may be used to specify subdomains.\n   */\n  url: string | Cesium.Resource\n  /**\n   * The MIME type for images to retrieve from the server.\n   * Default value: 'image/jpeg'\n   */\n  format?: string\n  /**\n   * The layer name for WMTS requests.\n   */\n  layer: string\n  /**\n   * The style name for WMTS requests.\n   */\n  wmtsStyle: string\n  /**\n   * The identifier of the TileMatrixSet to use for WMTS requests.\n   */\n  tileMatrixSetID: string\n  /**\n   * A list of identifiers in the TileMatrix to use for WMTS requests, one per TileMatrix level.\n   */\n  tileMatrixLabels: Array<any>\n  /**\n   * A Clock instance that is used when determining the value for the time dimension. Required when `times` is specified.\n   */\n  clock?: Cesium.Clock\n  /**\n   * TimeIntervalCollection with its data property being an object containing time dynamic dimension and their values.\n   */\n  times?: Cesium.TimeIntervalCollection\n  /**\n   * A object containing static dimensions and their values.\n   */\n  dimensions?: AnyObject\n  /**\n   * The tile width in pixels.\n   * Default value: 256\n   */\n  tileWidth?: number\n  /**\n   * The tile height in pixels.\n   * Default value: 256\n   */\n  tileHeight?: number\n  /**\n   * The tiling scheme corresponding to the organization of the tiles in the TileMatrixSet.\n   */\n  tilingScheme?: Cesium.GeographicTilingScheme | Cesium.WebMercatorTilingScheme\n  /**\n   * The rectangle covered by the layer.\n   */\n  rectangle?: VcRectangle\n  /**\n   * The minimum level-of-detail supported by the imagery provider.\n   */\n  minimumLevel?: number\n  /**\n   * The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.\n   */\n  maximumLevel?: number\n  /**\n   * The ellipsoid. If not specified, the WGS84 ellipsoid is used.\n   */\n  ellipsoid?: Cesium.Ellipsoid\n  /**\n   * A credit for the data source, which is displayed on the canvas.\n   */\n  credit?: Cesium.Credit | string\n  /**\n   * The subdomains to use for the {s} placeholder in the URL template. If this parameter is a single string, each character in the string is a subdomain. If it is an array, each element in the array is a subdomain.\n   */\n  subdomains?: string | string[]\n  /**\n   * Triggers before the VcImageryProviderWmts is loaded.\n   */\n  onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the VcImageryProviderWmts is successfully loaded.\n   */\n  onReady?: (readyObject: VcReadyObject) => void\n  /**\n   * Triggers when the component load failed.\n   */\n  onUnready?: (e: any) => void\n  /**\n   * Triggers when the VcImageryProviderWmts is destroyed.\n   */\n  onDestroyed?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the imagery provider encounters an asynchronous error.\n   */\n  onErrorEvent?: (evt: Cesium.TileProviderError) => void\n  /**\n   * Triggers when the provider is ready for use.\n   */\n  onReadyPromise?: (evt: boolean, viewer: Cesium.Viewer, instance: VcComponentPublicInstance) => void\n}\n\nexport type VcImageryProviderWmtsRef = VcComponentPublicInstance<VcImageryProviderWmtsProps>\n"],"names":[],"mappings":";;;;;;;;AA6BO,MAAM,wBAA2B,GAAA;AAAA,EACtC,GAAG,GAAA;AAAA,EACH,GAAG,MAAA;AAAA,EACH,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,QAAU,EAAA,IAAA;AAAA,GACZ;AAAA,EACA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,IACN,QAAU,EAAA,IAAA;AAAA,GACZ;AAAA,EACA,eAAiB,EAAA;AAAA,IACf,IAAM,EAAA,MAAA;AAAA,IACN,QAAU,EAAA,IAAA;AAAA,GACZ;AAAA,EACA,gBAAkB,EAAA,KAAA;AAAA,EAClB,GAAG,KAAA;AAAA,EACH,GAAG,KAAA;AAAA,EACH,UAAY,EAAA,MAAA;AAAA,EACZ,GAAG,SAAA;AAAA,EACH,GAAG,UAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,SAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,SAAA;AAAA,EACH,GAAG,MAAA;AAAA,EACH,GAAG,UAAA;AACL,E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