On Oct 22, 6:46 pm, phicarre <[email protected]> wrote:
> I like your first option but I try to do that:
> $encoded_points=json_encode($points);
> something = ???
> echo "make_markers (something);";
>
> and have the code of the function "make_markers" in another page
> because this function is used several times !
it's
$encoded_points=json_encode($points);
echo "
make_markers($enocoded_points);
";
Once you encode it it's Javascript code, there's no need for any other
transformation. as long as your array is sequential, starting with
zero, shouldn't be a problem. I've done it many times. Without seeing
your code, I can't tell you what you are doing wrong. It could be
anything. It may not even be related to json_encode.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---