# Class: GPX

## GPX

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

#### new ol.format.GPX() experimental

src/ol/format/gpxformat.js, line 27

### Extends

- ol.format.XMLFeature

### Methods

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

src/ol/format/gpxformat.js, line 377

  Read the first feature from a GPX source.

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

  ##### Returns:

  Feature.

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

src/ol/format/gpxformat.js, line 408

  Read all features from a GPX source.

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

  ##### Returns:

  Features.

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

src/ol/format/gpxformat.js, line 441

  Read the projection from a GPX source.

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

  ##### Returns:

  Projection.

#### writeFeatures(features){ArrayBuffer|Node|Object|string} experimental

src/ol/format/gpxformat.js, line 816

  Encode an array of features in the GPX format.

  Name | Type | Description
  --- | --- | ---
  `features` | Array.<ol.Feature> | Features.

  ##### Returns:

  Result.