KML · format guide
KML viewer online
KML is the XML format Google Earth writes. MapCrafter parses placemarks as points, LineStrings as paths and Polygons as areas, keeps the names and descriptions as popup fields, and lets you restyle all of it without touching the original file.
What a KML file is
KML is what you get when someone has drawn something in Google Earth and sent it to you. It is a good format for that: it carries names, descriptions, styling and arbitrary folders of features, and it holds points, lines and polygons in a single file.
The common problem with KML is that it is untidy by design. Styles are defined in a shared block and referenced by id; features are nested in folder hierarchies; the same file may mix geometries. MapCrafter converts the drawable geometry into one layer per KML file. Folder hierarchy is flattened and the layer receives a starting style; KML display styles are not reproduced automatically.
The other thing worth knowing is that KML coordinates are longitude-first, which is the opposite of how almost everyone speaks. MapCrafter handles the ordering, so a file that opens correctly in Google Earth opens correctly here.
What MapCrafter reads from it
- Placemarks
- Rendered as points, with the name used as the default label
- Paths and LineStrings
- Rendered as lines, including tessellated and extruded forms flattened to 2D
- Polygons and MultiGeometry
- Rendered as filled areas with outlines
- Folders
- Drawable features are collected into a single layer; folder hierarchy is not preserved
- Style metadata
- Some metadata survives conversion as properties; set the visible layer style in the studio
- Descriptions
- Shown in the popup; HTML in a description is escaped rather than executed
Mapping a KML file, step by step
- 1
Drop the .kml file in
Drawable features are collected into one layer, including mixed geometry.
- 2
Check the layers
A mixed layer draws polygons, paths and placemarks together. Import separate files when you need independent layer controls.
- 3
Restyle
Choose your own colours, sizes and labels. The original file is never modified.
- 4
Publish
Share a link, embed it, or export a PNG for a document.
Things that go wrong with KML
Every one of these is a property of the format rather than a bug in a particular tool, which is why they keep happening.
Everything appears off the coast of Africa.
Coordinate order. KML is longitude, latitude, altitude. A file written by hand as latitude, longitude lands mirrored. If you are generating KML, check the order before anything else.
The styling in my file was ignored.
KML styles can be inline, in a shared Style block referenced by id, or in an external .kmz stylesheet. Some style metadata is retained as properties, but the studio applies its own layer style. Set colours, widths and opacity after importing.
A big region is filled with a solid block of colour.
Google Earth renders polygon fills with a ceiling on size and often as outlines only. Very large polygons look heavy when filled at low zoom. Set the fill opacity down, or render the layer as outlines only.
Network links and ground overlays did nothing.
A NetworkLink is a remote reference that Google Earth fetches at view time, and a GroundOverlay is a georeferenced image. Neither is a static geometry, so neither is imported. Export the referenced content first.
Time-stamped animation is missing.
gx:Track and TimeStamp elements carry an animation timeline, which is a Google Earth playback feature rather than geometry. The coordinates are imported; the timeline is not.
KML maps in the gallery
3 live maps built from KML data, each showing its source columns and the geometry that was detected.
- Mixed geometryAreas and points from one KML fileA single file containing both polygons and placemarks, rendered as two coordinated layers. Real KML exports mix geometry types constantly; a tool that renders only the first one it finds is not finished.
- Route mapIntercity rail linesA network diagram in geographic space, with line weight carrying service frequency. Line width is a free visual channel that most tools leave unused, and it is the right one when the data is a count of something moving along the line.
- Outline buffersSchool catchments across TexasLarge rural catchments with a wide radius variation, imported from KML. At this scale a fixed radius would be wrong for both a city district and a rural county, so the radius is read from the data.
KML questions
- How do I open a KML file without Google Earth?
- Drop it into the studio. Placemarks, paths and polygons are parsed in the browser and drawn on a vector basemap. Nothing is installed and the file is not uploaded anywhere.
- What is the difference between KML and KMZ?
- KMZ is a zip archive containing a KML file, usually with its images and icons alongside it. MapCrafter unzips KMZ in the browser, so both open the same way.
- Can I edit a KML file here?
- You can restyle it, choose what is visible, add labels and popups, and export the result as GeoJSON. The original KML is never modified — you would be editing a map, not the file.
- Are KML folders imported as separate layers?
- No. A KML file becomes one layer with any mixed geometry drawn together. A KMZ containing several KML files can produce several layers, one per readable KML file.
Other formats MapCrafter reads
Start with your own fileLast updated 2026-10-22.