coppermine-gallery.com/forum

Support => Français (French) => Language Specific Support => cpg1.4.x Français (French) => Topic started by: mab on December 15, 2005, 04:11:01 PM

Title: Coppermine et Google Maps version simple
Post by: mab on December 15, 2005, 04:11:01 PM
Bonjour, je viens de plancher sur l'association des images de Google Earth et de La Galerie Photo Coppermine, je suis un débutant en php cependant le résultat parle de lui même.

Vous pouvez voir un exemple plus travaillé sur mon site qui fera l'objet d'un post.
http://mab2002.free.fr/photographie/geglobal.php (http://mab2002.free.fr/photographie/geglobal.php)

Ressources : tutorial google map

http://bluweb.com/us/chouser/gmapez/start.html (http://bluweb.com/us/chouser/gmapez/start.html)

Dans coppermine en mode admin dans la configuration

"Champs personnalisés pour les descriptions d'images (laisser vide si inutilisés)"
Champs 1 : "google earth"

copier le fichier geglobal.php que vous trouverez http://mab2002.free.fr/googleearth.zip (http://mab2002.free.fr/googleearth.zip) dans le dossier d'install de coppermine

Editer le fichier geglobal.php

ligne 5 changer votre_cle_googleearth
vous trouverez la cle en vous enregistrant sur http://www.google.com/apis/maps/

      src="http://maps.google.com/maps?file=api&v=1&key=votre_cle_googleearth"

ligne 8

indiquer le chemine de votre coppermine

      src="http://votresite_coppermine/gmapez.js"

changer les coordonnées de votre site par defaut c'est la pointe st mathieu

<a href="http://maps.google.com/maps?ll=48.32971293309381,-04.770802546411111&amp;spn=0.006130,0.009795&amp;t=k&amp;hl=en"></a>

Indiquer l'url de votre site

$thumb = "<a href=\"http://dossier_coppermine/displayimage.php?pos=-".$pid."\" >"."<img src="."albums/".$filepath."thumb_".$filename." alt="."".$title.">";

enregistrer et c'est tout pour ce fichier


Editer le fichier gmapez.js

ligne 15

indiquer le chemine de votre coppermine

     link.href = 'http://votresite_coppermine/gmapez.css';


enregistrer et c'est tout pour ce fichier


ensuite entrez les coordonnées de google earth

demarrez le programme google earth, placez un placemark à l'endroit de la photo
copiez le placemark, demarrez le bloc note collez

ça donne ça

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Placemark>
  <name>sillon</name>
  <LookAt>
    <longitude>-2.005946974167992</longitude>
    <latitude>48.6528781237738</latitude>
    <range>3225.427442395625</range>
    <tilt>5.955881145669564</tilt>
    <heading>0.0003592884377077218</heading>
  </LookAt>
  <styleUrl>root://styles#default</styleUrl>
  <Point>
    <coordinates>-2.000464853020787,48.65836512197592,0</coordinates>
  </Point>
</Placemark>
</kml>

récupérez les coordonnées placée entre les balises <coordinates> </coordinates> sans ,0
ce qui donne -2.000464853020787,48.65836512197592 et collez ça dans le champ google earth de votre coppermine

et voila ça marche

amusez vous bien !!!

Breizh Passion



[edit=Titooy]J'ai changé le titre de Google Earth en Google Maps[/edit]
Title: Re: Coppermine et Google Earth version simple
Post by: François Keller on December 15, 2005, 05:05:47 PM
Bravo, c'est assez impressionnant.

Une idée à creuser pour certains sites...
Title: Re: Coppermine et Google Earth version simple
Post by: Pascal YAP on December 16, 2005, 10:31:15 AM
Bonjour,
Quoteet voila ça marche... amusez vous bien !!!
DIABLE  ;D Terrible !
Par contre une connexion puissante est requise  >:( Tout comme Google Earth d'ailleurs.

Super chouette, merci pour la contribution.

PYAP
Title: Re: Coppermine et Google Earth version simple
Post by: mab on December 16, 2005, 02:10:15 PM
Merci pour les commentaires, par contre vu que mon niveau est débutant, j'aimerai bien avoir les corrections d'un spécialiste, pour optimiser ce fichier geglobal.php pour permettre une installation plus facile.

Title: Re: Coppermine et Google Earth version simple
Post by: Loïc on December 24, 2005, 12:19:43 PM
Tiens, il y a du monde que je connais, ici...  ;D

Je confirme, c'est du super taf... Voilà ce que ça donne chez moi:

http://presquile.crozon.free.fr/coppermine/geglobal.php

C'est clair que c'est réservé aux connexions haut-débit, mais bon...
Title: Re: Coppermine et Google Earth version simple
Post by: Tranz on January 16, 2006, 09:10:32 AM
Sorry for my english but this is the only such thread... :)

Is this code for Google Maps or Google Earth? They're two different things that run on different applications... Unless... is there no difference between them outside of the United States?

When I clicked on the demo link, it seems as if it's for Google Maps. Not knowing that there was a mod for Google Maps, I made one today. :-\ Although it was a learning experience, I still prefer to avoid duplicating work. ;)

On the other hand, I see that it uses xml whereas I did not. Does this work with Google Earth in addition to Maps? I've done a hack for generating a Google Earth kml file in conjunction with the minicms plugin so I recognize some of the code.

Thank you. :)
Title: Re: Coppermine et Google Earth version simple
Post by: Titooy on January 16, 2006, 08:21:12 PM
You're right, it should rather say Google Maps. I'll change the subject.
It uses Google Earth to know the coordinates which can be found in a .kml file (that's the xml part of the post)

Pour ceux qui ne comprennent pas l'anglais, TranzNDance signale qu'il y a une différence entre Google Maps (un service web) et Google Earth (un logiciel qui utilise - entre autres - les données de Google Maps). Et puisque sa recherche sur "Google Maps" n'a rien donné, elle a créé un autre mod pour Google Maps sans savoir qu'il en existait déjà un...
Title: Re: Coppermine et Google Maps version simple
Post by: Tranz on January 16, 2006, 08:31:36 PM
Thanks for the clarification, Titooy, and for translating it into French. :)
Title: Re: Coppermine et Google Maps version simple
Post by: Tranz on January 16, 2006, 08:42:55 PM
I'm not really sure how Google Earth is used to get the coordinates (easily). I've tried it and it seems I have to convert from degrees to decimal, and that's after manually entering the coordinates since I don't see a copy option. I tried to translate the instructions in the first post from French to English but the translatation wasn't very good.

Here's a way that doesn't require Google Earth: http://www.google.com/apis/maps/documentation/#Event_Listeners
Title: Re: Coppermine et Google Maps version simple
Post by: Titooy on January 16, 2006, 09:10:00 PM
I never used Google Earth so I'm not sure but mab wrote you have to put a placemark in Google Earth, then copy it and paste it in notepad. In there you find the coordinates that you put in the picture's first user field. But your solution is certainly better since it could be useful for people like me who are using Linux since there is still no Linux version of Google Earth.

Mab didn't visit the forum since he posted his mod so I'm not sure he would improve it himself... so it's up to you ;)
Title: Re: Coppermine et Google Maps version simple
Post by: mab2002 on January 25, 2006, 12:14:44 PM
Merci à Titooy pour sa traduction, en effet j'utilise le logiciel Google Earth pour les placemarks, si vous avez des évolutions à apporter ça m'intéresse.

A bientôt Matthieu