views:

16

answers:

0

In my project each time it run will get all of tweet information from database and point it in the map

but when i use jquery to check if it has the new tweet in database then will get it and point into the map but it's not working

function autoUpdate(){
  var url= "CheckUpdate/";
  $.get(url, Update,

 function(jsonS) {
  $.each(jsonS, function(t,tweet) {
        lat = tweet.Latitude;
        lng = tweet.Longitude;
        point = new GLatLng(lat, lng);
        label = tweet.Text;
        icontype = tweet.Level;    
        map.addOverlay(createMarker(point, label,icontype));   });


   });

setTimeout(autoUpdate,60000);
}

in my createmarker() is

 function createMarker(point, label,icontype) {   return marker;}

How can i add marker each time my autoUpdate function working, Thank you