Commit 40897eba authored by Ayolo's avatar Ayolo

gmap

parent 6217fc79
......@@ -143,17 +143,20 @@ class gmap extends stdcontents
{
$pays = new pays($site->db);
$pays->load_by_id($ville->id_pays);
$this->buffer .= "var ville_".$ville->nom."_point = new google.maps.ClientGeocoder();\n";
$this->buffer .= "var ".$ville->nom."_dec = new google.maps.ClientGeocoder();\n";
$this->buffer .= "
ville_".$ville->nom."_point.getLatLng(\"".$ville->nom.", ".$ville->cpostal.", ".$pays->nom."\",
".$ville->nom."_dec.getLatLng(\"".$ville->nom.", ".$ville->cpostal.", ".$pays->nom."\",
function(point)
{
if(!point)
return;
var ville_".$ville->nom."_loc = new google.maps.Marker(point);
".$this->name.".addOverlay(ville_".$ville->nom."_loc);
});\n";
if(!point)
alert('crap');
else
{
var ".$ville->nom." = new google.maps.Marker(point);
".$this->name.".addOverlay(".$ville->nom.");
}
}
);\n";
}
foreach ( $this->paths as $path )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment