vue-tianditu2
Version:
1 lines • 1.01 kB
Source Map (JSON)
{"version":3,"file":"init.mjs","sources":["../../../../../packages/tilelayer/tdt/use/init.ts"],"sourcesContent":["import { toBounds } from \"~/utils/converter\";\nimport type { Props } from \"./\";\n\nexport function useInit(props: Props, attrs: Record<string, unknown>) {\n const { url, minZoom, maxZoom, errorTileUrl, opacity, zIndex, bounds } = props;\n return new T.TileLayer.TDT(url, {\n minZoom,\n maxZoom,\n errorTileUrl,\n opacity,\n zIndex,\n bounds: bounds.length ? toBounds(bounds) : undefined,\n ...attrs\n });\n}\n"],"names":["useInit","props","attrs","url","minZoom","maxZoom","errorTileUrl","opacity","zIndex","bounds","toBounds"],"mappings":";AAGgB,SAAAA,EAAQC,GAAcC,GAAgC;AAC9D,QAAA,EAAE,KAAAC,GAAK,SAAAC,GAAS,SAAAC,GAAS,cAAAC,GAAc,SAAAC,GAAS,QAAAC,GAAQ,QAAAC,MAAWR;AACzE,SAAO,IAAI,EAAE,UAAU,IAAIE,GAAK;AAAA,IAC9B,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAQC,EAAO,SAASC,EAASD,CAAM,IAAI;AAAA,IAC3C,GAAGP;AAAA,EAAA,CACJ;AACH;"}