Search code examples
kml

Hosting kml files on public webserver


I want to display a kml layer in google maps,for that i have to host the kml file in a webserver. I want to get the url of actual kml file for doing this. I've created a kml file and I've hosted it in public webserver. I'm new to this and I want the url of the actual kml file and not the download url for the kml file. How to get the url of the actual kml file.


Solution

  • Dropbox and Google Drive, for example, hide the actual URL so you have to find the "share" options or download options which will help you find the URL to the actual KML content. Clicking on the file often displays a preview HTML page with information about the file not the file itself.

    For example, uploading a KML file to Google Drive (aka Google Docs) stores your KML. You can then click on the file name in the list of files which popups up a dialog with a download button. After you download it, the URL should be recorded in the download history of your web browser.

    Other public web servers would have similar mechanisms to access the actual file. Note that some web servers may not return the correct media type for KML files which may cause problems.