Websql to google maps markers
Posted
by
Roy van Neden
on Stack Overflow
See other posts from Stack Overflow
or by Roy van Neden
Published on 2012-10-31T10:39:28Z
Indexed on
2012/10/31
11:00 UTC
Read the original article
Hit count: 413
I am busy with my web application for a school project. It has has two pages. The first page uploads the location(latitude and longitude), price, date and kind of fuel. It works and i saved it with websql.(see screenshot) Now i want to get everything out of the web database and put it as a marker on my google maps card. I have my own location already. But i dont know how to get everything from the database to the map as a marker. I'm using jquery mobile/html5/css/javascript only.
Code to put it in a array or something else that will work.
db.transaction(function(tx){
tx.executeSql('SELECT brandstofsoort, literprijs, datum, latitude, longitude FROM brandstofstatus', [], function (tx, results) {
var lengte = results.rows.length, i;
for(var i = 0; i< lengte; i++){
var locations = [
[ ],
[ ],
[ ],
[ ],
[ ]
];
} // / for loop
});// /tx.executeSql
});// /db.transaction
Thanks in advance!
© Stack Overflow or respective owner