vue-cesium
Version:
Vue 3.x components for CesiumJS.
1 lines • 4.99 kB
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/providers/bingmaps/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-04-08 11:49:52\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\providers\\bingmaps\\index.ts\n */\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type { PropType } from 'vue'\nimport type { VcComponentInternalInstance, VcComponentPublicInstance, VcReadyObject } from '@vue-cesium/utils/types'\nimport { useProviders } from '@vue-cesium/composables'\nimport { ellipsoid, tileDiscardPolicy } from '@vue-cesium/utils/cesium-props'\nimport { kebabCase } from '@vue-cesium/utils/util'\nimport { providerEmits } from '@vue-cesium/utils/emits'\n\nexport const bingImageryProviderProps = {\n url: {\n type: [String, Object] as PropType<string | Cesium.Resource>,\n default: 'https://dev.virtualearth.net'\n },\n bmKey: String,\n tileProtocol: String,\n mapStyle: {\n type: String as PropType<string | Cesium.BingMapsStyle>,\n default: 'Aerial'\n },\n culture: {\n type: String,\n default: ''\n },\n ...ellipsoid,\n ...tileDiscardPolicy\n}\nexport default defineComponent({\n name: 'VcImageryProviderBing',\n props: bingImageryProviderProps,\n emits: providerEmits,\n setup(props, ctx) {\n // state\n const instance = getCurrentInstance() as VcComponentInternalInstance\n instance.cesiumClass = 'BingMapsImageryProvider'\n useProviders(props, ctx, instance)\n return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || ''))\n }\n})\n\nexport type VcImageryProviderBingProps = {\n /**\n * The url of the Bing Maps server hosting the imagery.\n */\n url: string\n /**\n * The Bing Maps key for your application, which can be created at https://www.bingmapsportal.com/. Note that it is bmKey\n */\n bmKey?: string\n /**\n * The protocol to use when loading tiles, e.g. 'http:' or 'https:'. By default, tiles are loaded using the same protocol as the page.\n */\n tileProtocol?: string\n /**\n * The type of Bing Maps imagery to load.\n * Default value: 'Aerial'\n */\n mapStyle?: 'Aerial' | 'AerialWithLabels' | 'AerialWithLabelsOnDemand' | 'CanvasDark' | 'CanvasGray' | 'CanvasLight'\n /**\n * The culture to use when requesting Bing Maps imagery. Not all cultures are supported. See http://msdn.microsoft.com/en-us/library/hh441729.aspx for information on the supported cultures.\n */\n culture?: string\n /**\n * The ellipsoid. If not specified, the WGS84 ellipsoid is used.\n */\n ellipsoid?: Cesium.Ellipsoid\n /**\n * The policy that determines if a tile is invalid and should be discarded. By default, a DiscardEmptyTileImagePolicy will be used, with the expectation that the Bing Maps server will send a zero-length response for missing tiles. To ensure that no tiles are discarded, construct and pass a NeverTileDiscardPolicy for this parameter.\n */\n tileDiscardPolicy?: Cesium.DiscardMissingTileImagePolicy | Cesium.NeverTileDiscardPolicy\n /**\n * Triggers before the VcImageryProviderBing is loaded.\n */\n onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n /**\n * Triggers when the VcImageryProviderBing 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 VcImageryProviderBing 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 VcImageryProviderBingRef = VcComponentPublicInstance<VcImageryProviderBingProps>\n"],"names":[],"mappings":";;;;;;;;AAgBO,MAAM,wBAA2B,GAAA;AAAA,EACtC,GAAK,EAAA;AAAA,IACH,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,IACrB,OAAS,EAAA,8BAAA;AAAA,GACX;AAAA,EACA,KAAO,EAAA,MAAA;AAAA,EACP,YAAc,EAAA,MAAA;AAAA,EACd,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,QAAA;AAAA,GACX;AAAA,EACA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,GAAG,SAAA;AAAA,EACH,GAAG,iBAAA;AACL,EAAA;AACA,0BAAe,eAAgB,CAAA;AAAA,EAC7B,IAAM,EAAA,uBAAA;AAAA,EACN,KAAO,EAAA,wBAAA;AAAA,EACP,KAAO,EAAA,aAAA;AAAA,EACP,KAAA,CAAM,OAAO,GAAK,EAAA;AAEhB,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAA,QAAA,CAAS,WAAc,GAAA,yBAAA,CAAA;AACvB,IAAa,YAAA,CAAA,KAAA,EAAO,KAAK,QAAQ,CAAA,CAAA;AACjC,IAAA,OAAO,MAAG;AA3Cd,MAAA,IAAA,EAAA,CAAA;AA2CiB,MAAA,OAAA,kBAAA,CAAmB,YAAU,EAAS,GAAA,QAAA,CAAA,KAAA,KAAT,mBAAgB,QAAS,CAAA,IAAA,KAAQ,EAAE,CAAC,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GAChF;AACF,CAAC,CAAA;;;;"}