JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 95
  • Score
    100M100P100Q87049F
  • License MIT

convert kmz to json

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dji-kmz-parser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Dji-kmz-parser

    Usage

    1. kmzToJson

      Convert KMZ file (with Blob format) to JSON.

      <script setup lang="ts">
      import kmzFile from '/files/flight.kmz?url'
      import { kmzToJson } from '../lib'
      
      fetch(kmzFile)
          .then(async (res: Response) => {
              const obj = await kmzToJson(res)
              console.log(obj)
          })
          .catch((err: string) => console.log(err))
      </script>
    2. jsonToKmz

      Convert JSON to KMZ file.

      <script setup lang="ts">
      import flightObj from '/files/flightObj.ts'
      import { jsonToKmz } from '../lib'
      
      jsonToKmz(flightObj).then((res: Blob) => {
          const a = document.createElement('a')
          a.href = window.URL.createObjectURL(res)
          a.download = 'flight.kmz'
          a.click()
      }).catch((err: string) => console.log(err))
      </script>