Reputation: 49
Can an unhosted KML/KMZ file be sent to Google Maps from a C# Windows program? Essentially, I want to send a KML/KMZ file directly to Google Maps instead of sending a URL pointing back to a public server containing the KML file.
Thanks in advance for your feedback.
Upvotes: 1
Views: 488
Reputation: 161324
Not to Google Maps or to the Google Maps API v3 native KmlLayer, for that the URL needs to be "hosted on a publicly accessible web server."
If you use a third party parser like geoxml3 [and possibly geoxml-v3), you can use a local file (depending on the browser security policy) or even a string containing valid KML.
geoxml3 supports KMZ, but whether it will work from a local filesystem depends on the browser.
The disadvantage of using a third party parser is you lose the performance advantage of the tiled rendering that you get if using KmlLayer.
You might also investigate using Google Earth (but you didn't include that in your tags)
Upvotes: 1