First of all, I am new to programming. I'm trying to create a webpage on which you have a Google map embedded, and on this map you see a colored line that sets the path. For this I use Django. In my views.py, I have a variable called dots, where I have some coordinates recorded in the list as a string. For instance,
points = ('-15.4566620,28.07163320','15.7566620,29.07163320',....)
Then on google script maps I have:
var flightPlanCoordinates = [
new google.maps.LatLng(-15.4566620,28.07163320), new google.maps.LatLng(-15.7566620,29.07163320), ];
So, when I show my page, I see a line between these points.
I would like to have instead something like:
var flightPlanCoordinates = [
{% for point in points %} new google.maps.LatLng({{point}}), {% endfor %} ];
But that does not work.
What am I doing wrong, and how should it be?
Thank you very much.