Deep Dive

“The fastest auto dealership site in the world” Hundreds of hours of perf learnings, distilled

ContactSign Up for Free
Community Plugin
View plugin on GitHub


Parses KML files into GeoJSON objects. GeoJSON Feature objects are converted into individual nodes


npm install gatsby-transformer-kml --save

How to use

Ensure you have gatsby-source-filesystem installed

npm install gatsby-source-filesystem

Configure your gatsby-config.js to point to the directory where your .kml files can be found

// In your gatsby-config.js
module.exports = {
  plugins: [
      resolve: `gatsby-source-filesystem`,
      options: {
        path: `${__dirname}/src/kml/`,

How to query

GeoJSON nodes will be of types KmlPoint, KmlLineString, KmlPolygon, KmlMultiPoint, KmlMultiLineString, and KmlMultiPolygon.

You can query the resulting GeoJSON nodes like the following

  allKmlPoint {
    edges {
      node {
        properties {


Only files with valid MIME type of application/ are supported. Other media types will be ignored by the plugin. kmz is not supported

Currently only data that can be parsed to GeoJSON format is supported. Other KML features such as overlays are not yet implemented.

© 2022 Gatsby, Inc.