google's documentation says the google maps javascript api can be used to access the maps of google earth enterprise but doesn't say how the script src need to be specified..
to access google maps api, i use src="http://maps.google.com/maps/api/js?sensor=true"
can somebody provide directions on replacing this URL?
To use a Google Maps for Enterprise key with the Google AJAX API Loader, you just load the common loader using your key:
<script type="text/javascript" src="http://www.google.com/jsapi?key=YOURKEY&sensor=true"></script>
See: https://support.google.com/code/bin/answer.py?hl=en&answer=92831
You would then use the URL of an alternative Earth Enterprise database to connect to instead of the default database via the google.earth.createInstance method. For example.
var options = { database: 'http://yourserver.com/database/' };
google.earth.createInstance('map3d', initCB, failureCB, options);
You may have to alter your Google Earth Server configuration before Google Earth Plugin instances will be able to connect to it using this method, it depends on the earth server version.
Really though, for help and support with the enterprise versions of Google Earth you should contact enterprise support. That is what it is there for after all.
Related
I used a new key and got:
"This page can't load google maps correctly"
What does it really mean?
<script src="https://maps.googleapis.com/maps/api/js?key=MY_API_KEY&libraries=places" async defer"></script>
This is a key from a commercial account.
For anyone who runs into this "This page can't load google maps correctly" error and has added the Places library in the JavaScript API script, i.e.:
<script src="https://maps.googleapis.com/maps/api/js?key=KEY&libraries=places"></script>
You must enable the Places API. It's not enough to enable the JavaScript API only. Refer to Google's documentation:
Before using the Places library in the Maps JavaScript API, first
ensure that the Places API is enabled in the Google Cloud Platform
Console, in the same project you set up for the Maps JavaScript API.
Hope this helps.
I bought an API key for Google Map. I tried to implement the client key in a PhoneGap application.
<script src="http://maps.googleapis.com/maps/api/js?client=YOUR_CLIENT_ID&v=3.17"></script>
However, it doesn't work. I have an alert with the message: "your domain is not permitted."
I can't put a domain in the admin console, because it's a phonegap app and the file protocol doesn't work well too.
How can I use the client key with a phonegap app ?
Many thanks
I think Google Maps Javascript API v3 for work does not work on PhoneGap/Cordova, because the API refers the domain of the page.
You can still use Google Maps Web APIs (direction APIs, geocoding APIs ... etc) with your key.
Ask your Google Maps reseller (or directly Google support team).
I have an application calling the v2 api without key using:
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key="></script>
This has stopped working over the past couple of days. Console is showing only one error:
Control is no longer supported in the Google Maps Javascript API v2...
However, whichever way I try and call the v3 API, I get an error :
"Google has disabled use of the Maps API for this application. The provided key is not a valid Google API Key, or it is not authorized for the Google Maps Javascript API v3 on this site"
I have checked, and re-connected a valid bank card to the account (although the outstanding balance was $0.00) This payment appears not to have been registered.
Any leaders on where to go next?
Don't use the Google Maps Javascript API v2, it is deprecated and has been turned off, replaced with a simple wrapper for the Google Maps Javascript API v3
From the error you report in the console, the functionality you are attempting to use is not available in the wrapper.
Port your code to v3 ASAP.
See https://developers.google.com/maps/documentation/javascript/v2/v2tov3#overview
You need to register a new API key.
Loading the Google Maps API page states to use this code with a new API key placed into the code at API_KEY and you will probably need to set your sensor to FALSE, also you may need to place the new API key into your application settings page.
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=API_KEY&sensor=FALSE">
</script>
Is it permitted to use the Google Maps API (ver 2) in offline mode if I use OpenStreet tiles?
If so, how can I do this? I can store the Google JS file locally (main.js). What else do I need to do?
It is not permitted according to the Terms Of Service
http://code.google.com/apis/maps/terms.html
It is also unlikely to work, as the API Javascript is designed only to work online e.g. it must be able to talk to Googles servers.
We are using Google Maps over https using a free maps API key. The Google Maps API FAQ says:
The Google Maps JavaScript API and Google Static Maps API can be
accessed over a secure (https) connection by Google Maps API Premier
customers. If the Google Maps APIs are used with a free Maps API key
on a secure site, the browser may warn the user about non-secure
objects on the screen.
My understanding of the above is that the API will work anyway, but users might get a security warning. For us, however, the map will not display at all, rendering the page completely unusable.
Does anybody know if Google is blocking use of the maps API over https with free maps API keys?
As of March 15th, 2011, anyone may use the API at https://maps-api-ssl.google.com/
http://googlegeodevelopers.blogspot.com/2011/03/maps-apis-over-ssl-now-available-to-all.html
From a quick look at the google maps premier site it seems like they probably are blocking it. One of the listed features is the "ability to provide secure maps over https"
http://code.google.com/apis/maps/documentation/premier/
Okay, here is some more specific info:
http://code.google.com/apis/maps/faq.html#ssl
It seems like you are probably getting a blank map because you are attempting to access with https a service that is only available to premiere members
You should probably use a protocol relative URL.
<script type="text/javascript" src="//maps.google.com/maps/api/js?sensor=false"></script>
After installing SSL certificate, I just had to do a simple change for everything to work.
From this:
<script src="http://maps.google.com/maps/api/js?sensor=true" type="text/javascript"></script>
To this:
<script src="//maps.google.com/maps/api/js?sensor=true" type="text/javascript"></script>
You might be able to work around the problem by using OpenStreetMap instead. It doesn't present a super easy solution, because OpenStreetMap's main tile server does not support HTTPS connections, however there are various things you're allowed to do with OpenStreetMap which google would never allow.
Some more discussion of this on the OpenStreetMap forum: http://forum.openstreetmap.org/viewtopic.php?id=5546
no, google will let you display the map even if you are using free google API's over https login.
It definitely gives you a pop up box asking for a yes/no but your map will be displayed for sure.