coppermine-gallery.com/forum

Support => Français (French) => Language Specific Support => cpg1.4.x Français (French) => Topic started by: xav31 on December 30, 2007, 04:37:02 PM

Title: Ouverture automatique infobulle google Map
Post by: xav31 on December 30, 2007, 04:37:02 PM
Bonjour

Qui pourrait m'éclairer sur l'application Google Api ?

j'ai installé google map et je souhaite que sur la page http://www.quipollue.com/displayimage.php?album=random&cat=0&pos=-42 (http://www.quipollue.com/displayimage.php?album=random&cat=0&pos=-42) le marqueur de la carte s'ouvre automatiquement.
J'ai essayé ceci, mais l'infobulle est vide.
Je n'arrive pas  faire passer l'information dans le marqueur.
j'ai ajouté ceci :setTimeout("marker.openInfoWindowHtml().maximize()",0);
Si je supprime cette ligne, il faut cliquer sur le marqueur et ça fonctionne normalement.


<script type="text/javascript">
      //<![CDATA[
      if (GBrowserIsCompatible()) {
      
         //create map
         var map = new GMap2(document.getElementById("small_map"));
         map.setCenter(new GLatLng($latitude,$longitude), {$default_zoom_level});
         map.setMapType({$CONFIG['gmap_small_type']});
         map.setMapType(G_SATELLITE_MAP);
         map.addControl(new GSmallMapControl());
         map.addControl(new GMapTypeControl());
         
         // Creates a marker whose info window displays the file info
         function createMarker(point, content)
         
         {
            var marker = new GMarker(point);
            // Show this markers index in the info window when it is clicked
            var html = content;
            
            GEvent.addListener(marker, "click", function(){marker.openInfoWindowHtml(html);});
            setTimeout("marker.openInfoWindowHtml().maximize()",0);
            
            return marker;
         };
         //code output for points
         $point_code;
      }   else {
           alert("Sorry, the Google Maps API is not compatible with this browser");
      }
      //]]>
      </script>

??? ???
Xavier
Title: Re: Ouverture automatique infobulle google Map
Post by: François Keller on December 30, 2007, 05:20:06 PM
euh désolé, mais ici c'est un forum consacré à coppermine, pas à google map.
essayez plutôt du coté de google
Title: Re: Ouverture automatique infobulle google Map
Post by: xav31 on December 30, 2007, 10:06:16 PM
 :-X

oui, c'est vrai...

Désolé ;)