Sorry  I forgot   to  say that  missing  a  GET  request  in  the
url  -
 http://www.mytrailrecord.com/mytrailrecord/html/track.php?route=3
( example)  because    my  PHP  script  have  a  $_GET[´route']. I
embbed  Javascript  into  PHP  code  to   load the  routes  with
MySQL  query.  A  script  part  is below :
<?
 $route = $_GET['route'];
$pontos = array();

$sql= "SELECT lat,lng FROM geo_points WHERE route='$route' ORDER BY id
ASC";

$result= mysql_query($sql);

if(mysql_num_rows($result)==0){
     echo "Route not  found !";
     exit;
  }

  $initial_lat = mysql_result($result,0,"lat");
  $initial_lng = mysql_result($result,1,"lng");
  $initial_zoom = 10; // 1 through 17

echo "map.setCenter(new GLatLng(".$initial_lat.",".$initial_lng."),".
$initial_zoom.");\n";
 echo "var point = new GLatLng(".$initial_lat.",".$initial_lng.");\n";
 echo "var marker = createMarker(point);\n";
 echo "map.addOverlay(marker);\n";

   while($r = mysql_fetch_row($result))
   {
 $pontos[]="new GLatLng(".$r['0'].",".$r['1'].")";
 echo "var polyline = new GPolyline([".implode(",\n",$pontos)."],
\"#ff0000\",6);";
 echo "map.addOverlay(polyline);\n";
   }
?>
 I   debug  it  in  Firebug   but  not  shows  any error.
Only  it   loads  very  slow  in  the  Internet  Explorer  and
Mozilla firefox   both.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to