aide pour google map

Consultez la formation au référencement naturel Google de WebRankInfo / Ranking Metrics

micker
Nouveau WRInaute
 
Messages: 18
Inscription: Mar Aoû 08, 2006 12:20

aide pour google map

Message le Jeu Jan 11, 2007 16:26

Salut a tous je galere un peu sur google map
voicic mon code
Code: Tout sélectionner
  <body onunload="GUnload()">
    <!-- the div where the map will be displayed -->
   <center> <div id="map" style="width: 500px; height: 600px"></div></center>
    <script type="text/javascript">
    //<![CDATA[

    // Check to see if this browser can run the Google API
    if (GBrowserIsCompatible()) {

      var gmarkers = [];
      var htmls = [];
      var to_htmls = [];
      var from_htmls = [];
      var i=0;
    
// A function to create the marker and set up the event window
      function createMarker(point,name,html) {
        var marker = new GMarker(point);

        // The info window version with the "to here" form open
        to_htmls[i] = html + '<br>Itin&eacute;raire <b></b> vers ce lieu- <a href="javascript:fromhere(' + i + ')">depuis ce lieu</a>' +
           '<br>Lieu de d&eacute;part: <form action="http://maps.google.com/maps" method="get" target="_blank">' +
           '<input type="text" SIZE=40 MAXLENGTH=40 name="saddr" id="saddr" value="" /><br>' +
           '<INPUT value="Itin&eacute;raire" TYPE="SUBMIT">' +
           '<input type="hidden" name="daddr" value="' + point.lat() + ',' + point.lng() +
                  // "(" + name + ")" +
           '"/>';
        // The info window version with the "to here" form open
        from_htmls[i] = html + '<br>Itin&eacute;raire <a href="javascript:tohere(' + i + ')">vers ce lieu</a> - <b>depuis ce lieu</b>' +
           '<br>Lieu arriv&eacute;e:<form action="http://maps.google.com/maps" method="get"" target="_blank">' +
           '<input type="text" SIZE=40 MAXLENGTH=40 name="daddr" id="daddr" value="" /><br>' +
           '<INPUT value="Itin&eacute;raire" TYPE="SUBMIT">' +
           '<input type="hidden" name="saddr" value="' + point.lat() + ',' + point.lng() +
                  // "(" + name + ")" +
           '"/>';
        // The inactive version of the direction info
        html = html + '<br>Itin&eacute;raire: <a href="javascript:tohere('+i+')">vers ce lieu</a> - <a href="javascript:fromhere('+i+')">depuis ce lieu</a>';
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        gmarkers[i] = marker;
        htmls[i] = html;
        i++;
        return marker;
      }
      // functions that open the directions forms
      function tohere(i) {
        gmarkers[i].openInfoWindowHtml(to_htmls[i]);
      }
      function fromhere(i) {
        gmarkers[i].openInfoWindowHtml(from_htmls[i]);
      }
      // Display the map, with some controls and set the initial location
      var map = new GMap2(document.getElementById("map"));
     map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
     map.setCenter(new GLatLng(43.626954,1.447449), 14);
     map.setMapType(G_HYBRID_MAP); // Vue mixte
    map.openInfoWindow(map.getCenter(),document.createTextNode("cliquer sur les marqueurs"));

     // Set up three markers with info windows
      var point = new GLatLng( 43.626954,1.447449);
      var marker = createMarker(point,'bbb',"<div style='font-family:arial;'><b><a href='http://www.lebbb.org'>bbb</a></b><br>96 rue Michel Ange<br>31500 Toulouse<br>tel 0561133714<br>fax 0561133598</div>")
      map.addOverlay(marker);
      var point = new GLatLng( 43.63672,1.441054);
      var marker = createMarker(point,'Renan',"<div style='font-family:arial;'><b>galerie de l'&eacute;cole renan</b><br>che d'Audibert<br>31200 Toulouse</div>")
      map.addOverlay(marker);
      var point = new GLatLng(43.628807,1.444155);
      var marker = createMarker(point,'friche',"<div style='font-family:arial;'><b>La future friche Renan</b><br>14 rue Ernest-Renan 31200<br> Toulouse</div>")
      map.addOverlay(marker);

    }
// display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
</script>

voila j'ai trois markeur et je voufrais qu'ils aient tous un icon spécial ... j'y arrive pas (j'arrive a avoir un icone diff mais pour tous)
comment faire

Pareil je veux créer une ligne entre c'est 3 points mais cela fait planter l'affichage qqun pour m'aider SVP
Merci

jeroen
WRInaute accro
WRInaute accro
 
Messages: 2384
Inscription: Ven Aoû 30, 2002 13:35

Message le Jeu Jan 11, 2007 22:47



Formation recommandée sur ce thème :

Formation Référencement naturel Google : apprenez une méthode efficace pour optimiser à fond le référencement naturel dans Google de façon durable... Formation animée par Olivier Duffez et Fabien Facériès, experts en référencement naturel.

Tous les détails sur le site Ranking Metrics : programme, prix, dates et lieux, inscription en ligne.

Lectures recommandées sur ce thème :



Qui est en ligne

Utilisateurs parcourant ce forum: sky et 0 invités