original_string: public function getHTML()
      {
  
              $html="<div id='".$this->googleMapNameId."' style='width: ".$this->googleMapWidth."px; height: ".$this->googleMapHeight."px; ".$this->divStyle."'>Veuilliez patienter pendant le chargement de la carte...</div>";
  
          //$html.="<script  >";
          /*
          if (count($this->coordonnees)>0) {
              foreach ($this->coordonnees as $indice => $value) {
                  if (isset($value['link'])) {
                      $html.="tabAdresses[".$indice."]=\"".$value['link']."\";\n";
                  }
              }
          }
  
          $html.="</script>";
          $html.="<div id='".$this->googleMapNameId."' style='width: ".$this->googleMapWidth."px; height: ".$this->googleMapHeight."px;'>Veuilliez patienter pendant le chargement de la carte...</div>";
  
          if ($this->debugMode)
              $displayDebug='block';
          else
              $displayDebug='none';
  
          $html.="<div style='width:500px; height:300px;overflow:scroll;display:".$displayDebug.";' id='debugGoogleMap'></div>";
          $html.="<script  >load();</script>";
  
          // fonction appelant les affichages de coordonnées ,  appels regroupées dans une fonction qui groupe les coordonnées par paquet ,  afin de ne pas trop en envoyer a la fois
          if (count($this->coordonnees)>0) {
              $html.="<script  >";
              $html.="var numPaquet=0;\n";
              $html.="var timer;\n";
              $html.="startTimerPaquets();\n";
              $html.="function startTimerPaquets()\n";
              $html.="{";
              $html.="afficheCoordonneesParPaquets();\n";
              $html.="timer = setInterval(\"afficheCoordonneesParPaquets()\", ".$this->setTimeOutPaquets.");\n";
              $html.="}\n";
  
              $html.="function afficheCoordonneesParPaquets(){\n";
              $i=0;
              $numPaquet = 0;
              foreach ($this->coordonnees as $indice => $value) {
                  $image = ", \"http://www.google.com/mapfiles/marker.png\"";//
                  if (isset($value['imageFlag']) && $value['imageFlag']!='') {
                      $image = ", \"".$value['imageFlag']."\"";
                  }
  
                  if ($i%10==0) {
                      $html.="if (numPaquet==".$numPaquet.")\n";
                      $html.="{\n";
                      $iDebut = $i;
                  }
  
                  $html.=" getCoordonnees(\"".$value['adresse']."\", ".$indice." ".$image.");\n";
  
                  if ($i==$iDebut+9 || $i==count($this->coordonnees)-1 ) {
                      $html.="}\n";
                      $numPaquet++;
                  }
                  $i++;
              }
  
  
              $html.="if (numPaquet>".$numPaquet.")\n";
              $html.="{\n";
              $html.="clearInterval(timer);\n";
              $html.="}\n";
              $html.="numPaquet++;\n";
              $html.="}\n";
              $html.="</script>";
          }
          */
  
          /*
          if ($this->debugMode)
              $displayDebug='block';
          else
              $displayDebug='none';
              */
          //$html.="<div style='width:500px; height:300px;overflow:scroll;display:".$displayDebug.";' id='debugGoogleMap'></div>";
          $html.="<script  >load();</script>";
          $html.="<script  >";
          if (isset($params['urlImageIcon']) && isset($params['pathImageIcon'])) {
              $urlImage = $params['urlImageIcon'];
  
              list($imageSizeX,  $imageSizeY,  $typeImage,  $attrImage) = getimagesize($params['pathImageIcon']);
  
              $html.="
                  var icon = new GIcon();
                  //icon.image = image;
  
  
                  icon.image = \"$urlImage\";
                  //icon.shadow = \"https://labs.google.com/ridefinder/images/mm_20_shadow.png\";
                  icon.iconSize = new GSize($imageSizeX,  $imageSizeY);
                  icon.shadowSize = new GSize(22,  20);
                  icon.iconAnchor = new GPoint(2,  24);
                  icon.infoWindowAnchor = new GPoint(5,  1);
                  var iconMarker = new GIcon(icon);
              ";
          } else {
              $html.="
                  var icon = new GIcon();
                  //icon.image = image;
                  var iconMarker = new GIcon(icon);
  
                  icon.image = \"https://labs.google.com/ridefinder/images/mm_20_red.png\";
                  //icon.shadow = \"https://labs.google.com/ridefinder/images/mm_20_shadow.png\";
                  icon.iconSize = new GSize(30,  24);
                  icon.shadowSize = new GSize(22,  20);
                  icon.iconAnchor = new GPoint(2,  24);
                  icon.infoWindowAnchor = new GPoint(5,  1);
              ";
          }
          $html.="</script>";
  
          if (isset($params['listeCoordonnees'])) {
              $html.="<script  >";
              foreach ($params['listeCoordonnees'] as $indice => $values) {
                  $html.="
  
                      point$indice = new GLatLng(".$values['latitude'].", ".$values['longitude'].");
                      marker$indice = new GMarker(point$indice, iconMarker);
                      overlay$indice = map.addOverlay(marker$indice);
                      //marker$indice.openInfoWindowHtml(\"".$values['libelle']."\");
  
                      ";
  
                  if (isset($values['jsCodeOnClickMarker'])) {
                      $html.="
                              function onClickFunction$indice(overlay,  point){".$values['jsCodeOnClickMarker']."}";
  
                      $html.="GEvent.addListener(marker$indice,  'click',  onClickFunction$indice);";
                  }
  
                  if (isset($values['jsCodeOnMouseOverMarker'])) {
                      $html.="function onMouseOverFunction$indice(overlay, point){".$values['jsOnMouseOverMarker']."}";
                      $html.="GEvent.addListener(marker$indice, 'mouseover', onMouseOverFunction$indice);";
  
                  }
  
                  if (isset($values['jsCodeOnMouseOutMarker'])) {
                      $html.="function onMouseOutFunction$indice(overlay, point){".$values['jsCodeOnMouseOutMarker']."}";
                      $html.="GEvent.addListener(marker$indice, 'mouseout', onMouseOutFunction$indice);";
  
                  }
  
              }
              $html.="</script>";
          }
  
  
  
          return $html;
      }
code: public function getHTML()
      {
  
              $html="<div id='".$this->googleMapNameId."' style='width: ".$this->googleMapWidth."px; height: ".$this->googleMapHeight."px; ".$this->divStyle."'>Veuilliez patienter pendant le chargement de la carte...</div>";
  
          //$html.="<script  >";
          /*
          if (count($this->coordonnees)>0) {
              foreach ($this->coordonnees as $indice => $value) {
                  if (isset($value['link'])) {
                      $html.="tabAdresses[".$indice."]=\"".$value['link']."\";\n";
                  }
              }
          }
  
          $html.="</script>";
          $html.="<div id='".$this->googleMapNameId."' style='width: ".$this->googleMapWidth."px; height: ".$this->googleMapHeight."px;'>Veuilliez patienter pendant le chargement de la carte...</div>";
  
          if ($this->debugMode)
              $displayDebug='block';
          else
              $displayDebug='none';
  
          $html.="<div style='width:500px; height:300px;overflow:scroll;display:".$displayDebug.";' id='debugGoogleMap'></div>";
          $html.="<script  >load();</script>";
  
          // fonction appelant les affichages de coordonnées ,  appels regroupées dans une fonction qui groupe les coordonnées par paquet ,  afin de ne pas trop en envoyer a la fois
          if (count($this->coordonnees)>0) {
              $html.="<script  >";
              $html.="var numPaquet=0;\n";
              $html.="var timer;\n";
              $html.="startTimerPaquets();\n";
              $html.="function startTimerPaquets()\n";
              $html.="{";
              $html.="afficheCoordonneesParPaquets();\n";
              $html.="timer = setInterval(\"afficheCoordonneesParPaquets()\", ".$this->setTimeOutPaquets.");\n";
              $html.="}\n";
  
              $html.="function afficheCoordonneesParPaquets(){\n";
              $i=0;
              $numPaquet = 0;
              foreach ($this->coordonnees as $indice => $value) {
                  $image = ", \"http://www.google.com/mapfiles/marker.png\"";//
                  if (isset($value['imageFlag']) && $value['imageFlag']!='') {
                      $image = ", \"".$value['imageFlag']."\"";
                  }
  
                  if ($i%10==0) {
                      $html.="if (numPaquet==".$numPaquet.")\n";
                      $html.="{\n";
                      $iDebut = $i;
                  }
  
                  $html.=" getCoordonnees(\"".$value['adresse']."\", ".$indice." ".$image.");\n";
  
                  if ($i==$iDebut+9 || $i==count($this->coordonnees)-1 ) {
                      $html.="}\n";
                      $numPaquet++;
                  }
                  $i++;
              }
  
  
              $html.="if (numPaquet>".$numPaquet.")\n";
              $html.="{\n";
              $html.="clearInterval(timer);\n";
              $html.="}\n";
              $html.="numPaquet++;\n";
              $html.="}\n";
              $html.="</script>";
          }
          */
  
          /*
          if ($this->debugMode)
              $displayDebug='block';
          else
              $displayDebug='none';
              */
          //$html.="<div style='width:500px; height:300px;overflow:scroll;display:".$displayDebug.";' id='debugGoogleMap'></div>";
          $html.="<script  >load();</script>";
          $html.="<script  >";
          if (isset($params['urlImageIcon']) && isset($params['pathImageIcon'])) {
              $urlImage = $params['urlImageIcon'];
  
              list($imageSizeX,  $imageSizeY,  $typeImage,  $attrImage) = getimagesize($params['pathImageIcon']);
  
              $html.="
                  var icon = new GIcon();
                  //icon.image = image;
  
  
                  icon.image = \"$urlImage\";
                  //icon.shadow = \"https://labs.google.com/ridefinder/images/mm_20_shadow.png\";
                  icon.iconSize = new GSize($imageSizeX,  $imageSizeY);
                  icon.shadowSize = new GSize(22,  20);
                  icon.iconAnchor = new GPoint(2,  24);
                  icon.infoWindowAnchor = new GPoint(5,  1);
                  var iconMarker = new GIcon(icon);
              ";
          } else {
              $html.="
                  var icon = new GIcon();
                  //icon.image = image;
                  var iconMarker = new GIcon(icon);
  
                  icon.image = \"https://labs.google.com/ridefinder/images/mm_20_red.png\";
                  //icon.shadow = \"https://labs.google.com/ridefinder/images/mm_20_shadow.png\";
                  icon.iconSize = new GSize(30,  24);
                  icon.shadowSize = new GSize(22,  20);
                  icon.iconAnchor = new GPoint(2,  24);
                  icon.infoWindowAnchor = new GPoint(5,  1);
              ";
          }
          $html.="</script>";
  
          if (isset($params['listeCoordonnees'])) {
              $html.="<script  >";
              foreach ($params['listeCoordonnees'] as $indice => $values) {
                  $html.="
  
                      point$indice = new GLatLng(".$values['latitude'].", ".$values['longitude'].");
                      marker$indice = new GMarker(point$indice, iconMarker);
                      overlay$indice = map.addOverlay(marker$indice);
                      //marker$indice.openInfoWindowHtml(\"".$values['libelle']."\");
  
                      ";
  
                  if (isset($values['jsCodeOnClickMarker'])) {
                      $html.="
                              function onClickFunction$indice(overlay,  point){".$values['jsCodeOnClickMarker']."}";
  
                      $html.="GEvent.addListener(marker$indice,  'click',  onClickFunction$indice);";
                  }
  
                  if (isset($values['jsCodeOnMouseOverMarker'])) {
                      $html.="function onMouseOverFunction$indice(overlay, point){".$values['jsOnMouseOverMarker']."}";
                      $html.="GEvent.addListener(marker$indice, 'mouseover', onMouseOverFunction$indice);";
  
                  }
  
                  if (isset($values['jsCodeOnMouseOutMarker'])) {
                      $html.="function onMouseOutFunction$indice(overlay, point){".$values['jsCodeOnMouseOutMarker']."}";
                      $html.="GEvent.addListener(marker$indice, 'mouseout', onMouseOutFunction$indice);";
  
                  }
  
              }
              $html.="</script>";
          }
  
  
  
          return $html;
      }
code_tokens: public function getHTML ( ) { $ html = "<div id='" . $ this -> googleMapNameId . "' style='width: " . $ this -> googleMapWidth . "px; height: " . $ this -> googleMapHeight . "px; " . $ this -> divStyle . "'>Veuilliez patienter pendant le chargement de la carte...</div>" ; //$html.="<script  >"; /*
          if (count($this->coordonnees)>0) {
              foreach ($this->coordonnees as $indice => $value) {
                  if (isset($value['link'])) {
                      $html.="tabAdresses[".$indice."]=\"".$value['link']."\";\n";
                  }
              }
          }
  
          $html.="</script>";
          $html.="<div id='".$this->googleMapNameId."' style='width: ".$this->googleMapWidth."px; height: ".$this->googleMapHeight."px;'>Veuilliez patienter pendant le chargement de la carte...</div>";
  
          if ($this->debugMode)
              $displayDebug='block';
          else
              $displayDebug='none';
  
          $html.="<div style='width:500px; height:300px;overflow:scroll;display:".$displayDebug.";' id='debugGoogleMap'></div>";
          $html.="<script  >load();</script>";
  
          // fonction appelant les affichages de coordonnées ,  appels regroupées dans une fonction qui groupe les coordonnées par paquet ,  afin de ne pas trop en envoyer a la fois
          if (count($this->coordonnees)>0) {
              $html.="<script  >";
              $html.="var numPaquet=0;\n";
              $html.="var timer;\n";
              $html.="startTimerPaquets();\n";
              $html.="function startTimerPaquets()\n";
              $html.="{";
              $html.="afficheCoordonneesParPaquets();\n";
              $html.="timer = setInterval(\"afficheCoordonneesParPaquets()\", ".$this->setTimeOutPaquets.");\n";
              $html.="}\n";
  
              $html.="function afficheCoordonneesParPaquets(){\n";
              $i=0;
              $numPaquet = 0;
              foreach ($this->coordonnees as $indice => $value) {
                  $image = ", \"http://www.google.com/mapfiles/marker.png\"";//
                  if (isset($value['imageFlag']) && $value['imageFlag']!='') {
                      $image = ", \"".$value['imageFlag']."\"";
                  }
  
                  if ($i%10==0) {
                      $html.="if (numPaquet==".$numPaquet.")\n";
                      $html.="{\n";
                      $iDebut = $i;
                  }
  
                  $html.=" getCoordonnees(\"".$value['adresse']."\", ".$indice." ".$image.");\n";
  
                  if ($i==$iDebut+9 || $i==count($this->coordonnees)-1 ) {
                      $html.="}\n";
                      $numPaquet++;
                  }
                  $i++;
              }
  
  
              $html.="if (numPaquet>".$numPaquet.")\n";
              $html.="{\n";
              $html.="clearInterval(timer);\n";
              $html.="}\n";
              $html.="numPaquet++;\n";
              $html.="}\n";
              $html.="</script>";
          }
          */ /*
          if ($this->debugMode)
              $displayDebug='block';
          else
              $displayDebug='none';
              */ //$html.="<div style='width:500px; height:300px;overflow:scroll;display:".$displayDebug.";' id='debugGoogleMap'></div>"; $ html .= "<script  >load();</script>" ; $ html .= "<script  >" ; if ( isset ( $ params [ 'urlImageIcon' ] ) && isset ( $ params [ 'pathImageIcon' ] ) ) { $ urlImage = $ params [ 'urlImageIcon' ] ; list ( $ imageSizeX , $ imageSizeY , $ typeImage , $ attrImage ) = getimagesize ( $ params [ 'pathImageIcon' ] ) ; $ html .= "
                  var icon = new GIcon();
                  //icon.image = image;
  
  
                  icon.image = \"$urlImage\";
                  //icon.shadow = \"https://labs.google.com/ridefinder/images/mm_20_shadow.png\";
                  icon.iconSize = new GSize($imageSizeX,  $imageSizeY);
                  icon.shadowSize = new GSize(22,  20);
                  icon.iconAnchor = new GPoint(2,  24);
                  icon.infoWindowAnchor = new GPoint(5,  1);
                  var iconMarker = new GIcon(icon);
              " ; } else { $ html .= "
                  var icon = new GIcon();
                  //icon.image = image;
                  var iconMarker = new GIcon(icon);
  
                  icon.image = \"https://labs.google.com/ridefinder/images/mm_20_red.png\";
                  //icon.shadow = \"https://labs.google.com/ridefinder/images/mm_20_shadow.png\";
                  icon.iconSize = new GSize(30,  24);
                  icon.shadowSize = new GSize(22,  20);
                  icon.iconAnchor = new GPoint(2,  24);
                  icon.infoWindowAnchor = new GPoint(5,  1);
              " ; } $ html .= "</script>" ; if ( isset ( $ params [ 'listeCoordonnees' ] ) ) { $ html .= "<script  >" ; foreach ( $ params [ 'listeCoordonnees' ] as $ indice => $ values ) { $ html .= "
  
                      point$indice = new GLatLng(" . $ values [ 'latitude' ] . ", " . $ values [ 'longitude' ] . ");
                      marker$indice = new GMarker(point$indice, iconMarker);
                      overlay$indice = map.addOverlay(marker$indice);
                      //marker$indice.openInfoWindowHtml(\"" . $ values [ 'libelle' ] . "\");
  
                      " ; if ( isset ( $ values [ 'jsCodeOnClickMarker' ] ) ) { $ html .= "
                              function onClickFunction$indice(overlay,  point){" . $ values [ 'jsCodeOnClickMarker' ] . "}" ; $ html .= "GEvent.addListener(marker$indice,  'click',  onClickFunction$indice);" ; } if ( isset ( $ values [ 'jsCodeOnMouseOverMarker' ] ) ) { $ html .= "function onMouseOverFunction$indice(overlay, point){" . $ values [ 'jsOnMouseOverMarker' ] . "}" ; $ html .= "GEvent.addListener(marker$indice, 'mouseover', onMouseOverFunction$indice);" ; } if ( isset ( $ values [ 'jsCodeOnMouseOutMarker' ] ) ) { $ html .= "function onMouseOutFunction$indice(overlay, point){" . $ values [ 'jsCodeOnMouseOutMarker' ] . "}" ; $ html .= "GEvent.addListener(marker$indice, 'mouseout', onMouseOutFunction$indice);" ; } } $ html .= "</script>" ; } return $ html ; }
docstring: Affiche la carte
  Si l'on veut rajouter des evenements a cette carte ,  il faut ajouter le code des evenements apres l'appel a cette fonction, car c'est ici que l'on cree "map"
  
  @return string HTML
docstring_tokens: Affiche la carte Si l on veut rajouter des evenements a cette carte il faut ajouter le code des evenements apres l appel a cette fonction car c est ici que l on cree map