Hi,
I extract in PHP a list of points (= polygon) from a mysql database.
$points = $row['Points'];

The $points format is (val1,val2),(val3,val4), ...

Now I would like to pass these points to a javascript function. I do:
echo "my_function($points);";

from client side:
function my_function(pt)
{
...
}

I receive a message "undefined" for pt !

I tried this:
- I transform $points in array: $myarray
- I define  $myjarray=json_encode($myarray);
- I call  echo "my_function($myjarray);";

Its "better" but I don't see how to extract the couple of coordinates
pt.length return 1 !!!!

Finally, do you know a good method to pass a list of points (lat+lng)
from PHP to a javascript function without using XML format ?
--~--~---------~--~----~------------~-------~--~----~
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