# Class: KML

## KML

Feature format for reading and writing data in the KML format.

#### new ol.format.KML(opt_options) experimental

src/ol/format/kmlformat.js, line 62

  Name | Type | Description
  --- | --- | ---
  `options` | optional Options.
  Name | Type | Description
  --- | --- | ---
  `defaultStyle` | Array.<ol.style.Style> | undefined | optional Default style. The default default style is the same as Google Earth.

### Extends

- ol.format.XMLFeature

### Methods

#### readFeature(source){ol.Feature} experimental

src/ol/format/kmlformat.js, line 1479

  Read the first feature from a KML source.

  Name | Type | Description
  --- | --- | ---
  `source` | ArrayBuffer | Document | Node | Object | string | Source.

  ##### Returns:

  Feature.

#### readFeatures(source){Array.<ol.Feature>} experimental

src/ol/format/kmlformat.js, line 1508

  Read all features from a KML source.

  Name | Type | Description
  --- | --- | ---
  `source` | ArrayBuffer | Document | Node | Object | string | Source.

  ##### Returns:

  Features.

#### readProjection(source){ol.proj.Projection} experimental

src/ol/format/kmlformat.js, line 1626

  Read the projection from a KML source.

  Name | Type | Description
  --- | --- | ---
  `source` | ArrayBuffer | Document | Node | Object | string | Source.

  ##### Returns:

  Projection.