Google KML导出后自定义图标替换为默认空白图标问题求助
Hey there, this is a super common quirk with Google My Maps—when you export your map to KML, any custom icons you uploaded locally get swapped out for that default blank icon. The reason? Google doesn’t include links to your privately uploaded assets in the exported file; it replaces them with the generic public blank icon instead. Here’s how to fix this:
1. Manually Update the Exported KML File
You can directly edit your KML to point back to your custom icon, but first you need to host your icon at a publicly accessible URL (like a cloud storage service with public sharing enabled, or your own website).
Grab your exported KML code and look for all instances of this line:
<href>https://www.gstatic.com/mapspro/images/stock/503-wht-blank_maps.png</href>
Replace that URL with the public link to your custom icon. For example, if your camping icon is hosted at a public URL, your updated <IconStyle> sections would look like this:
<Style id="icon-1594-7CB342-nodesc-normal"> <IconStyle> <color>ff42b37c</color> <scale>1</scale> <Icon> <href>https://your-public-hosting.com/camping-icon.png</href> </Icon> </IconStyle> <!-- Rest of the style code stays the same --> </Style>
Make sure to replace this URL in both the normal and highlight style blocks (both have the default icon link). Save the modified KML, and when you use it elsewhere, your custom icon will load properly.
2. Avoid the Issue Entirely Before Exporting
If you want to skip editing KML later, set up your icons using public URLs from the start in Google My Maps:
- Upload your custom icon to a public hosting service, and double-check that the file’s sharing settings allow anyone to view it
- When adding a marker, instead of uploading a local file, choose "Add icon from URL" and paste your public icon link
- Now when you export the map to KML, the icon URL will be preserved, and you won’t get the blank default icon
Quick Check
Always verify that your custom icon URL doesn’t require authentication or have restricted access—if the link is private, the KML won’t be able to load the icon, and you’ll still see a broken or default placeholder.
内容的提问来源于stack exchange,提问作者Константин Верещак

