Skip to main content

KMLLoader

ogc-logo

The KMLLoader parses KML files into GeoJSON. From Wikipedia:

LoaderCharacteristic
File Extension.kml
File TypeText
File FormatKML
Data FormatGIS
Decoder TypeSynchronous
Worker Thread SupportNo
Streaming SupportNo

Usage​

import {KMLLoader} from '@loaders.gl/kml';
import {load} from '@loaders.gl/core';

const data = await load(url, KMLLoader, options);

Options​

OptionTypeDefaultDescription
gis.formatstring'geojson'Can be set to 'raw', 'geojson' or 'binary'.

Limitations​

  • In Node.JS, applications must import @loaders.gl/polyfills for the DOMParser polyfill.