import { useSource } from '@/composable/useSource'; import { AllSourceOptions } from '@/types'; import type { RasterSourceSpecification, RasterTileSource } from 'maplibre-gl'; import { createCommentVNode, defineComponent, type PropType, type SlotsType } from 'vue'; const sourceOpts = AllSourceOptions({ url : undefined, tiles : undefined, bounds : undefined, minzoom : undefined, maxzoom : undefined, tileSize : undefined, scheme : undefined, attribution: undefined, volatile : undefined }); export default /*#__PURE__*/ defineComponent({ name : 'MglRasterSource', props: { sourceId : { type : String as PropType, required: true }, url : String as PropType, tiles : Array as PropType, bounds : Array as unknown as PropType, minzoom : Number as PropType, maxzoom : Number as PropType, tileSize : Number as PropType, scheme : String as PropType, attribution: String as PropType, volatile : Boolean as PropType }, slots: Object as SlotsType<{ default: {} }>, setup(props, { slots }) { const source = useSource(props, 'raster', sourceOpts); return () => [ createCommentVNode('Raster Source'), source.value && slots.default ? slots.default({}) : undefined ]; } });