I'm trying to use flask-sqlite to present data through google maps api. 

Currently in my views.py file I have this method:

```
@app.route('/googlemap.html', methods=['POST'])
def map():
    if request.method == 'POST':
        conn = sqlite3.connect(database.db)
        cur = conn.cursor()
        c_lat = cur.execute("SELECT latitude FROM table")
        c_long = cur.execute("SELECT longitude FROM table")
        return render_template(content=render_template('googlemap.html', lat=c_lat.fetchall(), long=c_long.fetchall()))

```

In the google maps api example they manually add each point

```
function getPoints() {
        return [
          new google.maps.LatLng(37.782551, -122.445368),
          new google.maps.LatLng(37.782745, -122.444586)
        ];

```

But I want to query each data and add each latitude and longitude from the database to my googlemap.html file

```
<script>
function getPoints() {
          var points = [];
          //Add each latitude into points array and return and array off all points
        return points
      }
</script>

```

But I don't know how to add the *lat* and *long* variable that I've got in the views.py file into the javascript part of the code