First of all, I am a newbie at programming. I am trying to make a web page where you have a Google Map embedded, and in this Map you can see a colored line that sets a path. For this, I am using Django. In my views.py I have a variable called points, where I have some coordinates written in a list, as a string. For example,
points = ('-15.4566620,28.07163320','15.7566620,29.07163320',....)
Then, in the google maps script, I have:
var flightPlanCoordinates = [
new google.maps.LatLng(-15.4566620,28.07163320),
new google.maps.LatLng(-15.7566620,29.07163320),
];
So when I display my page, I see a line between those points.
I would like to have, instead of that, something like:
var flightPlanCoordinates = [
{% for point in points %}
new google.maps.LatLng({{point}}),
{% endfor %}
];
But this doesn't work.
What am I doing wrong, and how should it be?
Thank you very much.