Dynamically loading a dataset

29 views
Skip to first unread message

Emilio Otero

unread,
Apr 26, 2017, 2:10:33 PM4/26/17
to Timemap.js Development
Hi,

I have a map where i added the option to execute a query in a postgress database and the result writes a JSON. I want to update the map information, each time the query is run and results are obtained.

Can someone help me, please?

Emilio Otero

unread,
Apr 27, 2017, 2:51:28 AM4/27/17
to Timemap.js Development
Hi Stefano,

 I serialize the Form with Jquery that execute and PHP query to write the JSON.

$(document).ready(function() {
    $('form').submit(function(e){
e.preventDefault();
var data = '&specie='+$('#specie').val()+'&fenomenon='+$('#fenomeno').val();
$.ajax({
type:"POST",
dataType: "Json",
url : "query.php",
data:data,
success:function(){
datos = data.data;
}});
})
});


Emilio Otero

unread,
Apr 27, 2017, 5:17:44 AM4/27/17
to Timemap.js Development
Tanks Stefano, I'll see your code and I'll try to do something like this


El miércoles, 26 de abril de 2017, 20:10:33 (UTC+2), Emilio Otero escribió:
Reply all
Reply to author
Forward
0 new messages