Embedded KML Viewer Not displaying custom icons

310 views
Skip to first unread message

Brett Boston

unread,
Oct 12, 2010, 10:08:21 AM10/12/10
to KML Developer Support - Getting Started with KML
I am very new to working with Google Earth. I am trying to use the
Embedded KML Viewer to display a .kml file. When I open the file in
Google Earth, the custom icons I have assigned to the various places
in the file display properly. But when I go to the page to get the
code for the Embedded KML Viewer and insert the URL for my .kml file,
it loads/displays all the data points properly, but the custom icons
are replaced with red X's. I thought the custom icons would save
within the .kml file, but I'm assuming I have to point to them on the
server in some way to get the red X's to be replaced with my custom
icons. I tried uploading the custom icon graphics files to the same
directory on the server where the .kml file resides, but that had no
impact.

Can anyone advise on how to proceed?

ixboat

unread,
Oct 12, 2010, 11:32:32 AM10/12/10
to KML Developer Support - Getting Started with KML
Brett,

I have had similar issues with icons in the past also. (I'm sure
everyone has, don't feel like the Lone Stranger out there!)
Nothing is "saved" in the .kml except the specific code that you see
in it.
Local references to files will break as soon as you try to use the
file from a web server, because it doesn't know where your local drive
is anymore.

Most often, the problem falls into one of these types:

Path - make sure that the location, and file name, of the icons
specified in your code is spelled correctly and IN THE SAME CASE as
the actual location
You know that the full web path to the icon must be specified in
your .kml?
Here is an example:

---
<Icon>
<href>http://steamboat3d.com/files/t0010/green_orb_03.png</
href>
</Icon>
---

Permissions - Check the read/execute permissions on the icon (and all)
files on the server.
Sometimes read is not enough. Try setting them all to 755 permissions,
that's usually pretty safe.
Sometimes you have to even check the permissions on the directory that
they are in as well.
CAREFUL not to make permissions too loose, this can present security
hazards!
Really careful webmasters will not approve of using permissions
greater than 644 on most files, and they are correct that "less is
safer".

Cache - cache on browser, and on a CMS product on the server can
really bite you.
Make sure, when testing changes, to clear the CMS cache (if any), and
the browser cache also.
A cache-clearing plugin utility speeds this up on your browser.
It adds time and sometimes frustration to the testing cycle, but it
happens.

Sure hope this helps, good luck with it!

Regards,
ixboat

Brett Boston

unread,
Oct 12, 2010, 5:23:24 PM10/12/10
to KML Developer Support - Getting Started with KML
That was it. The paths to the custom icons were on the local machine
instead of to a web URL. I uploaded the icons to the server and used
the web URLs for them and it worked. Thanks a bunch.

Reply all
Reply to author
Forward
0 new messages