I'm building a real time IOT system over websocket. This is part of the code handling the new incomming data through devices-server-browser showing jqplot graph in infoWindow on google maps marker which is opening on each new data:
....
var infowindow = new google.maps.InfoWindow({ content: "<h1>Device1</h1>" });
google.maps.event.addListener(marker, 'click', function(t) {
infowindow.open(map, marker);
infowindow.setContent('<h3>Device1<img src="img/wait.gif"/></h3>');
ws.addEventListener("message", newData);
ws.send('{"getNewData":"Device1"}', { binary: false });
function newData(message) {
var content+='<div id="myPlot"></div>';
infowindow.setContent(content); // executed till this part on error come up
...
var graphParams = message.data; // [[1742367560000,4140],[1742369360000,4115]]
setTimeout(function() { // even with this
var plot=$.jqplot('myPlot', graphParams); // "No plot target specified"
}, 150);
...
}
});
The data comming in random intervals and sometime(after long random period each time) I'm getting "No plot target specified" error on specified line. Any ideas?