What it returns
Turn geographic documents into reusable data.
KMLLoader maps KML features into the common geometry-table family, giving applications a predictable handoff from document parsing to rendering or analysis.
Default
GeoJSONTable for application code
Rows
Object-row table for inspection
Columns
Arrow Table with WKB geometry
Document
Styles, folders, links, and views in KML
Detailed guide
KMLLoader reference
The sections below document imports, output shapes, options, and runtime limitations.
The KMLLoader parses KML files into loaders.gl geometry tables.
Usage
import {KMLLoader} from '@loaders.gl/geospatial/kml';
import {load} from '@loaders.gl/core';
const data = await load(url, KMLLoader, options);
Shapes
KMLLoader returns Apache Arrow Table objects by default. Set kml.shape to select another table representation.
| Shape | Output |
|---|---|
geojson-table | loaders.gl GeoJSON table |
object-row-table | loaders.gl row table with GeoJSON features |
arrow | Apache Arrow Table with WKB geometry |
Options
| Option | Type | Default | Description |
|---|---|---|---|
kml.shape | string | 'arrow' | Selects the returned table shape. |
Limitations
- The loader interprets KML coordinates as WGS84 longitude/latitude (
OGC:CRS84).