Select to view content in your preferred language

KML layer on OSM not displayed

1340
4
12-07-2011 04:47 AM
SujaSudhan
Deactivated User
Hi,

I am using OSM as a baselayer and trying to add a KML layer (created using google earth) to the map. However, I can't see the KML layer. The KML file is on my localhost. What might be the issue here?

Thanks!
0 Kudos
4 Replies
derekswingley1
Deactivated User
Your KML file has to be on the public Internet. Hosting it on your local machine will not work.

There are several free services available to host files. I prefer dropbox.
0 Kudos
SujaSudhan
Deactivated User
Thanks, that helps. I have used dropbox to host my file. However, the showing up of the KML layer is inconsistent. Sometimes it shows but other times it is simply failing to show up. No errors are shown. Also, if I debug I can see the KML layer added to the map but the loaded property is 'false'. If I use the dropbox link to open up the KML file in google earth, I can see the features.

What might prevent it from loading sometimes?

Thanks again.
0 Kudos
derekswingley1
Deactivated User
Can you post a link to your KML file and the code you're using to display it?
0 Kudos
SujaSudhan
Deactivated User
Thanks, this is sorted now. I have put the kml file inside the public folder in dropbox which seems to have resolved.

Many thanks for your help.
0 Kudos