Search code examples
google-earthgoogle-earth-plugin

Google Earth API doesn't load map on localhost


I am able to load KML into Google Maps despite what this answer says, but my problem is that there is no data coming in from Google's servers. All I get is a blurry map from the default texture that comes with the Google Earth plugin. Uploading the same html file to a public web server works.

enter image description here

Google is probably sending the window.location and checking if it can visit the URL from their end - if not then it denies any access to map data. This is to prevent people deploying apps locally (e.g. intranets) and not buying a license. I want to be able to develop locally, and this is restricting that ability.


Solution

  • I had the same problem, what helped me was to open the server's HTTP port on my router (and if you have a firewall you need to open the port there as well).