Display KML data

Data-driven styling for datasets

You can upload your KML data as a dataset and use data-driven styling to display it on the map. This approach offers better performance and more styling options.

To get started with datasets, read the Datasets Overview.

Third-party libraries

You can also use third-party libraries to parse KML files in the browser and display the data using the Maps JavaScript API's Data layer or other overlays.

Popular third-party libraries for parsing KML include:

Once you have converted the KML data to GeoJSON, you can load it into the Data layer using map.data.addGeoJson().