Problème clé API Google Earth
3 participants
Forum gratuit : Le forum des forums actifs :: Entraide & Support... :: Problème divers :: Archives des problèmes divers
Page 1 sur 1 • Partagez
Problème clé API Google Earth
Bonjour, j'aimerai mettre gogle earth dans une page html de mon forum mais ca ne marche pas. Est ce que quelqu'un peut m'aider ?
Voici le code que j'ai mis :
<html>
<head>
<title>Sample</title>
<script src="http://maps.google.com/maps/geo?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA&output=json&oe=utf8\
&sensor=true_or_false&key=ABQIAAAAhy8YRB4Cxd4XTviyf444BhTYg6VCg3pvvU90At3UxJINsq09sBTnk7cRzXAJ3hoPRFPBnALVC6Yy_A"> </script>
<script type="text/javascript">
var ge;
google.load("earth", "1");
function init() {
google.earth.createInstance('map3d', initCB, failureCB);
}
function initCB(instance) {
ge = instance;
ge.getWindow().setVisibility(true);
}
function failureCB(errorCode) {
}
google.setOnLoadCallback(init);
</script>
</head>
<body>
<div id="map3d" style="height: 400px; width: 600px;"></div>
</body>
</html>
Voici le code que j'ai mis :
<html>
<head>
<title>Sample</title>
<script src="http://maps.google.com/maps/geo?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA&output=json&oe=utf8\
&sensor=true_or_false&key=ABQIAAAAhy8YRB4Cxd4XTviyf444BhTYg6VCg3pvvU90At3UxJINsq09sBTnk7cRzXAJ3hoPRFPBnALVC6Yy_A"> </script>
<script type="text/javascript">
var ge;
google.load("earth", "1");
function init() {
google.earth.createInstance('map3d', initCB, failureCB);
}
function initCB(instance) {
ge = instance;
ge.getWindow().setVisibility(true);
}
function failureCB(errorCode) {
}
google.setOnLoadCallback(init);
</script>
</head>
<body>
<div id="map3d" style="height: 400px; width: 600px;"></div>
</body>
</html>
Dernière édition par geographe le Mer 15 Déc 2010 - 18:41, édité 1 fois
Re: Problème clé API Google Earth
Boujours,tu est sur que ton code est bon ?
Re: Problème clé API Google Earth
Bonsoir,
Rendez-vous sur ce lien :
http://maps.google.com/maps/empw?url=http:%2F%2Fmaps.google.com%2Fmaps%3Ff%3Dq%26source%3Ds_q%26hl%3Dfr%26geocode%3D%26q%3D1600%2BAmphitheatre%2BParkway,%2BMountain%2BView,%2BCA%26sll%3D37.0625,-95.677068%26sspn%3D20.702819,56.513672%26ie%3DUTF8%26hq%3D%26hnear%3D1600%2BAmphitheatre%2BPkwy,%2BMountain%2BView,%2BSanta%2BClara,%2BCalifornia%2B94043%26z%3D14%26ll%3D37.422782,-122.085099%26output%3Dembed&hl=fr
Et copiez/collez le code qui est donné !
Cordialement,
Rendez-vous sur ce lien :
http://maps.google.com/maps/empw?url=http:%2F%2Fmaps.google.com%2Fmaps%3Ff%3Dq%26source%3Ds_q%26hl%3Dfr%26geocode%3D%26q%3D1600%2BAmphitheatre%2BParkway,%2BMountain%2BView,%2BCA%26sll%3D37.0625,-95.677068%26sspn%3D20.702819,56.513672%26ie%3DUTF8%26hq%3D%26hnear%3D1600%2BAmphitheatre%2BPkwy,%2BMountain%2BView,%2BSanta%2BClara,%2BCalifornia%2B94043%26z%3D14%26ll%3D37.422782,-122.085099%26output%3Dembed&hl=fr
Et copiez/collez le code qui est donné !
Cordialement,
Alex Fowl- Membre actif
-
Messages : 7557
Inscrit(e) le : 28/03/2009
Re: Problème clé API Google Earth
je parle de google earth pas google map
Re: Problème clé API Google Earth
Bonsoir,
Désolé, je me suis basé sur l'adresse http://maps.google.com ! ^^
J'ai trouvé ce code qui marche :
Cordialement,
Désolé, je me suis basé sur l'adresse http://maps.google.com ! ^^
J'ai trouvé ce code qui marche :
- Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Google Earth</title>
<script src="http://www.google.com/jsapi?key=ABQIAAAAPo34DyTbdo2RpVUvdvK1qxTVkAM76o12Ue_ZZqmwjROaqOyBLhQVBCYY9lnsLXH3mdZLo-PWW8Z1DQ"></script>
<style type="text/css">
html { overflow:hidden; height:100%; }
body { height:100%; margin:0; }
</style>
<link rel="icon" type="image/png" href="./favicon.png"/>
<script>
google.load("earth", "1");
var ge = null;
function init() {
google.earth.createInstance("map3d", initCallback);
}
function initCallback(object) {
ge = object;
ge.getWindow().setVisibility(true);
}
</script>
</head>
<body onload='init()' id='body'>
<div id='map3d_container' style='border: 0px solid silver; height: 100%; width: 100%;'>
<div id='map3d' style='height: 100%;'></div>
</div>
</body>
</html>
Cordialement,
Alex Fowl- Membre actif
-
Messages : 7557
Inscrit(e) le : 28/03/2009
Re: Problème clé API Google Earth
Merci beaucoup, pourquoi rien ne s'affiche sur safari?
Re: Problème clé API Google Earth
Bonjour,
Cela ne marche pas sous Safari car ce navigateur ne prend pas en charge le plug-in Google Earth !
Cordialement,
Cela ne marche pas sous Safari car ce navigateur ne prend pas en charge le plug-in Google Earth !
Cordialement,
Alex Fowl- Membre actif
-
Messages : 7557
Inscrit(e) le : 28/03/2009
Re: Problème clé API Google Earth
rofl ok merci
Re: Problème clé API Google Earth
Bonjour, Afin de faciliter la gestion des problèmes, si votre problème est résolu, pensez à :
Vous pouvez également remercier les personnes qui vous ont aidé, en cliquant sur le bouton A bientôt sur ForumActif |
Alex Fowl- Membre actif
-
Messages : 7557
Inscrit(e) le : 28/03/2009
Re: Problème clé API Google Earth
C'est bon c'est installé seulement je n'ia pas les fonctionnalités de google earth comme rechercher par exemple . Ce site l'a, j'aimerai la même chose :
http://www.tout-sur-google-earth.com/Api-I-Frame-google-earth-bon-h52.htm
Aussi il possède une map afin de visualiser en temps réel les personnes connectés sur le site et j'aimerais aussi cela :
http://www.tout-sur-google-earth.com/Carte-des-membres-h3.htm
Est-ce que vous pouvez encore m'aider ? Mercid 'avance en tout cas
http://www.tout-sur-google-earth.com/Api-I-Frame-google-earth-bon-h52.htm
Aussi il possède une map afin de visualiser en temps réel les personnes connectés sur le site et j'aimerais aussi cela :
http://www.tout-sur-google-earth.com/Carte-des-membres-h3.htm
Est-ce que vous pouvez encore m'aider ? Mercid 'avance en tout cas
Re: Problème clé API Google Earth
Bonsoir,
Pour Google Earth :
Pour la carte des membres : http://www.carte-des-membres.com/
Cordialement,
Pour Google Earth :
- Code:
<br>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Earth Plug-in Initialization</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA1yO3h_E9GwHkG2z5bGkI-hQC_Yvl3JdGq-Kjm3yptGuVpEXvmRSMhsTaFO6RGBPSsyHo0jxov3d0pA" type="text/javascript"></script>
<script src="http://www.google.com/uds/api?file=uds.js&v=1.0&key=ABQIAAAA1yO3h_E9GwHkG2z5bGkI-hQC_Yvl3JdGq-Kjm3yptGuVpEXvmRSMhsTaFO6RGBPSsyHo0jxov3d0pA"
type="text/javascript"></script>
<script src="http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js"
type="text/javascript"></script>
<style type="text/css">
@import url("http://www.google.com/uds/css/gsearch.css");
@import url("http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css");
</style>
<script type="text/javascript">
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"));
// commandes pour relief
map.addMapType(G_PHYSICAL_MAP);
map.addMapType(G_SATELLITE_3D_MAP);
// latitude ,longitude de Apt, altitude
map.setCenter(new GLatLng(46,-0,58), 2);
var mapControl = new GMapTypeControl();
map.addControl(mapControl);
// commandes pour map et sat
map.setMapType(G_SATELLITE_3D_MAP);
var mapControl = new GMapTypeControl();
map.addControl(mapControl);
map.addControl(new GLargeMapControl());
// bind a search control to the map, suppress result list
map.addControl(new google.maps.LocalSearch(
{
resultList : document.getElementById("results")
}),
new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(0,600)));
}
}
</script>
</head>
<body onload="initialize()" onunlaod="GUnload" id='body' bgcolor="#000000">
<div id="map_canvas" style="width: 100%; height: 600px"></div>
</body>
</html>
Pour la carte des membres : http://www.carte-des-membres.com/
Cordialement,
Alex Fowl- Membre actif
-
Messages : 7557
Inscrit(e) le : 28/03/2009
Re: Problème clé API Google Earth
Il me demande une autre clé API pour le code
Re: Problème clé API Google Earth
AH non c'est bon, vous êtes vraiment très serviable, merci énormément.
Re: Problème clé API Google Earth
Il faut donner son vrai mot de passe de forum pour la carte des membres?
Re: Problème clé API Google Earth
Non, il ne me semble pas !
Cordialement,
Cordialement,
Alex Fowl- Membre actif
-
Messages : 7557
Inscrit(e) le : 28/03/2009
Re: Problème clé API Google Earth
Ok merci beaucoup
C'est vraiment une bonne chose d'avoir croisé votre chemin. Merci encore!
Le sujet est clôt!
C'est vraiment une bonne chose d'avoir croisé votre chemin. Merci encore!
Le sujet est clôt!
Forum gratuit : Le forum des forums actifs :: Entraide & Support... :: Problème divers :: Archives des problèmes divers
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum