ow3n
ow3n

Reputation: 6587

Google Earth plugin key not required, and not working either

The Google Earth browser plugin apparently no longer requires a key and it's impossible to request one.

The problem is when I run their sample code (Chrome 18 and FireFox 10) found here I get an error message:

The Google Maps API key used on this web site was registered for a different web site. The developer of this web site can generate a new key here.

When I check their plugin page it tells me:

Good news, you already have the Google Earth Plug-in installed. (Version 6.0.3.2197)

So no key is required, but when I try to run the code sans key I'm told to get one, and I can't because Google has removed the ability to request one or download the update. I read online that 6.2 is the newest version but the key has not been required since 6.

Any advice is appreciated.

Upvotes: 2

Views: 2842

Answers (3)

Alexander Roehnisch
Alexander Roehnisch

Reputation: 715

Despite it saying you don´t need an API key for Google Earth at various official places, your problem is solved, if you create one on https://code.google.com/apis/console (under "API access" and then click on "Create new browser key") and include in the jsapi include: <script src="//www.google.com/jsapi?key=yourkeyhere" type="text/javascript"></script>

Upvotes: 0

ow3n
ow3n

Reputation: 6587

After trying a force refresh, emptying the cache, and upgrading the browser, Google Chrome still wouldn't allow my example that doesn't use a key to work. I've figured out how to fix the issue.

The problem was that Chrome wasn't automatically updating the Google Earth browser plugin, regardless of the browser. Additionally, their plugin page confirmed I had an old version (6.0.3) but wouldn't allow me to manually update either. So I deinstalled the plugin following these instructions, and then downloaded the newest version (6.2.2) and installed it. One final thing I had to do (on my MacBook Pro): the new plugin installed in Library in my user directory

~/Library/Internet Plug-Ins/

but to get it working correctly I had to move the "Google Earth Web Plug-in" file to the root's library and then restart Chrome.

/Library/Internet Plug-Ins/

Upvotes: 3

Mike Jeffrey
Mike Jeffrey

Reputation: 3209

The Earth API doesn't require a key - your sample code appears to be working properly. In case you do see an error message in the future, make sure that there's no key= parameter when loading the Google JS:

<script src="http://www.google.com/jsapi?key=ABQIAAAAwbkbZLyhsmTCWXbTcjbgbRSzHs7K5SvaUdm8ua-Xxy_-2dYwMxQMhnagaawFo7L1FE1-amhuQxIlXw"></script>

The keys are specific to a domain, so if you copy old sample code from somewhere (such as from the Demo Gallery, for example) you should just strip out the key=xxx portion:

<script src="http://www.google.com/jsapi"></script>

Upvotes: 0

Related Questions