thanks, finally i did like this:

arrayLat = new Array(); // initializing the javascript array for
latitude
arrayLon = new Array(); // initializing the javascript array for
longitude
<?php

foreach( $arrayLat as $valueLat ) // for each line of the array where
there is a value
{
print "arrayLat.push(\"$valueLat\" );"; // This line updates the
script array with new entry
}
foreach( $arrayLon as $valueLon )
{
print "arrayLon.push(\"$valueLon\" );"; // This line updates the
script array with new entry
}

?>

function createMarker(point) {                  // function which create the 
marker
      var marker = new GMarker(point);
      return marker;
      }

                  for (i=0; i<<?php echo $count; ?>; i++){                      
                // for each entry of
the database
                         var point = new GLatLng(arrayLat[i] , arrayLon[i]);    
// create a
point with database coordinates
                 var marker = createMarker(point );                             
                // call the function
to create the marker
                 map.addOverlay(marker);                                        
                        // to place the marker
                   }    // end of the loop FOR

-- 
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