KML Import Guide
Already have a map in Google Earth or Google My Maps? Import it to Mapiry using KML files. KML (Keyhole Markup Language) is the standard format used by Google's mapping tools.
What is KML?
KML is an XML-based file format for geographic data used by:
- Google Earth - 3D globe visualization
- Google My Maps - Custom map creation
- Many GIS applications - ArcGIS, QGIS, etc.
KML can contain:
- Points (locations/placemarks)
- Folders (become categories)
- Descriptions
- Colors and styling
๐ก Tip: KML preserves folder organization and styling that CSV doesn't!
When to Use KML Import
Use KML import when:
- Migrating from Google My Maps
- You have Google Earth data
- Your data is organized in folders
- Locations have styled markers with colors
Use CSV import instead when:
- You have data in spreadsheets
- Source is a database export
- You need simple tabular data
See our CSV Import Guide for spreadsheet imports.
Exporting KML from Google My Maps
Step 1: Open Your Map
- Go to Google My Maps
- Click on the map you want to export
Step 2: Export KML
- Click the three-dot menu (โฎ) next to the map title
- Select "Export to KML/KMZ"
- Choose your settings:
- โ๏ธ Export all (includes all layers)
- โ KML format (not KMZ)
- Click "Download"
๐ก Tip: Choose KML (not KMZ) for easier troubleshooting if import issues occur.
Exporting KML from Google Earth
Google Earth Pro (Desktop)
- Open Google Earth Pro
- In the Places panel, find your data
- Right-click the folder or placemark
- Select "Save Place As..."
- Choose format: KML (not KMZ)
- Click "Save"
Google Earth Web
- Open earth.google.com
- Click Projects (folder icon)
- Open your project
- Click three-dot menu
- Select "Export as KML"
- Download
Importing KML to Mapiry
Step 1: Prepare Your Map
- Open your map in Mapiry (or create a new one)
- Make sure you're logged in (anonymous maps don't support KML import)
Step 2: Upload KML File
Look for the KML import feature in your map editor and upload your .kml or .kmz file.
Supported:
- KML files (.kml)
- KMZ files (.kmz) - automatically unzipped
Step 3: Import Process
Mapiry will:
- Parse your KML file
- Extract all placemarks (points)
- Convert folders to categories
- Extract colors from styles
- Create locations with descriptions
- Assign categories to locations
Step 4: Review Results
After import:
- Check the number of locations imported
- Verify categories were created correctly
- Review a few locations to ensure data imported properly
What Gets Imported
Supported KML Elements
โ Placemarks (Points):
- Name
- Description (HTML stripped to plain text)
- Coordinates (latitude, longitude)
- Style colors (converted to hex)
โ Organization:
- Folders โ Categories
- Folder colors applied to categories
- Parent folder determines location category
โ Extended Data:
- Address field (added to description)
- Category field (if present)
Not Supported
โ Geometric Features:
- LineStrings (paths) - Mapiry only supports points
- Polygons (areas) - Not supported
- Ground overlays
- 3D models
โ Advanced Styling:
- Custom icon URLs - Colors only
- Icon scale/size
- Label styles beyond color
โ Other:
- Time-based animation
- Camera views
- Network links
๐ก Note: Unsupported features are simply skipped. Your location data still imports successfully!
How KML Import Works
Folder to Category Conversion
KML folders automatically become Mapiry categories:
Example:
KML Structure:
- Restaurants (folder)
- Italian Restaurant
- Mexican Restaurant
- Hotels (folder)
- Downtown Hotel
Becomes in Mapiry:
- Restaurants category (contains Italian & Mexican restaurants)
- Hotels category (contains Downtown Hotel)
Color Extraction
- KML icon colors are converted to hex (#rrggbb format)
- Applied to created categories
- If no color specified, default colors are used
Description Handling
- HTML in descriptions is stripped to plain text
- CDATA wrappers are removed
- Line breaks and basic formatting preserved
- If address is found in extended data, it's added to description
Multiple Layers
Google My Maps "layers" are treated as folders and become categories.
Best Practices
1. Clean Up Before Export
Before exporting from Google My Maps:
- Remove unnecessary folders
- Delete duplicate locations
- Check for missing names/descriptions
- Organize into logical layers
2. Use Descriptive Folder Names
Folder names become category names:
- โ "Italian Restaurants" (clear)
- โ "Layer 1" (unclear)
3. Test with Small KML First
If importing hundreds of locations:
- Create a test KML with 5-10 locations
- Import and verify
- Once it works, import full file
4. Review After Import
After import completes:
- Check location count is correct
- Click random locations to verify data
- Verify categories created properly
- Check marker colors match expectations
5. Organize Categories After Import
After import, you can:
- Adjust category colors
- Rename categories
- Move locations between categories
- Delete unwanted categories
Common Issues & Solutions
"Invalid KML format" error
Problem: File is corrupted or not valid KML
Solutions:
- Verify file extension is
.kmlor.kmz - Re-export from Google My Maps/Earth
- Open KML in text editor to check it's XML
- Make sure download completed (not a preview page)
No locations found
Problem: KML contains only paths/polygons, not points
Solutions:
- Check what's in your KML (open in Google Earth)
- Convert paths to points before export
- Create placemarks at key points
- Mapiry only supports point/placemark data currently
Descriptions are garbled
Problem: Encoding issue with special characters
Solutions:
- Ensure KML uses UTF-8 encoding
- Re-export from source application
- Check for
<?xml version="1.0" encoding="UTF-8"?>at top of file
Folders not converted to categories
Problem: KML has no folder structure
Solutions:
- Verify KML has folders (open in Google Earth to check)
- Flat KML files (no folders) import without categories
- Add categories manually after import
Locations in wrong places
Problem: Coordinates imported incorrectly
Solutions:
- Open KML in Google Earth to verify coordinates
- KML should use WGS84 datum (standard)
- Check if there's a consistent offset
Some locations missing
Problem: Fewer locations than expected
Solutions:
- Check for locations with missing names
- Look for invalid coordinates
- Check for nested folders (may be flattened)
- Placemarks without coordinates are skipped
KMZ Files
KMZ is just a compressed KML file (ZIP format):
Option 1: Upload KMZ directly
- Mapiry automatically unzips and imports
Option 2: Manual extraction
- Change extension to
.zip - Unzip/extract
- Find
doc.kmlinside - Import the KML file
Converting Formats
KML to CSV
If you prefer CSV import:
- Export KML from Google
- Use online converter (MyGeodata Cloud, GPS Visualizer, KML2CSV)
- Download CSV
- Import to Mapiry using CSV Import
CSV to KML
To move data to Google My Maps:
- Create CSV with your data
- Use online converter (CSV to KML Converter, GPS Visualizer)
- Import KML to Google My Maps
Limitations
What KML import does NOT support:
- โ No anonymous map imports - must be logged in
- โ No advanced import options/settings UI
- โ No custom icon preservation - colors only
- โ No HTML description preservation - converted to plain text
- โ No extended data field mapping - only address and category recognized
- โ No paths/polygons - points only
- โ No batch processing - one file at a time
- โ No duplicate detection - duplicates will be imported
- โ No update mode - creates new locations only
Example Workflow
Migrating from Google My Maps
Goal: Move your map from Google to Mapiry
Step 1: Export (2 minutes)
- Open map in Google My Maps
- Three-dot menu > Export to KML/KMZ
- Choose KML format, Export all
- Download file
Step 2: Create Mapiry Map (1 minute)
- Log into Mapiry
- Create new map
- Give it the same title
Step 3: Import (2 minutes)
- Use import feature
- Upload your KML file
- Wait for processing
Step 4: Review (5 minutes)
- Check all locations imported
- Verify categories
- Adjust colors if needed
- Make map public
Total time: ~10 minutes!
KML vs CSV Comparison
| Feature | KML | CSV |
|---|---|---|
| Preserves folders | โ Yes (โ categories) | โ No |
| Preserves colors | โ Yes | โ No |
| Rich descriptions | โ ๏ธ HTML stripped | โ Plain text |
| Easy to edit | โ XML is complex | โ Spreadsheet |
| Best for... | Google Earth/Maps | Databases, spreadsheets |
๐ก Recommendation:
- Migrating from Google? Use KML
- Starting with spreadsheet? Use CSV
- Need to edit first? Convert KML to CSV, edit, then import
What's Next?
- CSV Import Guide - Import from spreadsheets
- Adding & Managing Locations - Refine imported locations
- Categories & Organization - Organize imported data
- Bulk Operations - Learn about import capabilities