Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle Maps API and KML File LocalHost Development Options
    text
    copied!<p>The Google Maps JavaScript version 3 API <a href="http://code.google.com/apis/maps/documentation/javascript/overlays.html#KMLLayers" rel="nofollow noreferrer">library documentation clearly explains</a>:</p> <blockquote> <p>The Google Maps API supports the KML and GeoRSS data formats for displaying geographic information. These data formats are displayed on a map using a KmlLayer object, whose constructor takes the URL of a <strong><em>publicly accessible</em></strong> KML or GeoRSS file.</p> </blockquote> <p>There are even several Stack Overflow questions about how to load local data:</p> <ul> <li><a href="https://stackoverflow.com/q/3514785/61654">Loading a local .kml file using google maps?</a></li> <li><a href="https://stackoverflow.com/q/3435566/61654">Google Maps kml files</a></li> </ul> <p>Some of the answers have pointed to third party libraries which can parse KML locally without the file needing to be public:</p> <ul> <li><a href="http://code.google.com/p/geoxml3/" rel="nofollow noreferrer">geoxml3</a></li> <li><a href="http://www.dyasdesigns.com/geoxml/" rel="nofollow noreferrer">GeoXML</a></li> <li><a href="http://econym.org.uk/gmap/extensions.htm#EGeoXml" rel="nofollow noreferrer">EGeoXml</a></li> </ul> <p>And while these solutions are good if you have a need to keep your data private, I simply want to make development easier. When running locally I obviously cannot parse my KML and therefore lose functionality that I am trying to test. I've posted a single generic KML file on a publicly available site, but then have to have different development code to render one thing vs. something else when running for real.</p> <p>What are my options for local development to render what would be publicly available dynamically generated KML files?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload