Hello,
i m totally new to web2py and im trying to use it with google maps api
and javascript to build a map.
So I got some longtiudes and latidues from a MySQL database.
The problem is that I cant convert the Python list [with the lat and
lng values] from the database into a javascript array which is needed.
I build the list with the values in a controller file and return it to
the view file.
Python list: coordinates((1,2) , (3,4) , (5,6))
I tried it on this way:
while(j<=len()) //len = length of coordinates
{
var coor[{{=x}}][0] = {{=coordinates[y][0]}};
var coor[{{=x}}][1] = {{=coordinates[y][1]}};
j++;
}
but it is not possible because Y doesnt raise... So the question is
how can I use JS variables and/or Python variables together?
Thanks for help