Hi all,
In my web-based vehicle tracking system project, I have a vehicle table whose lat/lon coordinates are updated every a few seconds. I refresh the vehicle layer every 10 seconds via autoRefreshOn() and autosRefreshOff() functions in the advanced samples of MapGuide help. But while the autoRefreshOn() function is open, that is while the vehicle layer is refreshed every 10 seconds, if I navigate the map with panning or zooming, often the map hangs, and the only thing you can do is pressing the escape key (or right click on the map map and click "stop"). My code is as follows:
function onTimeOut() {
autoRefreshOff();
var map = getMap();
if (map != null) {
if (!map.isBusy()) {
var mapLayer = map.getMapLayer("Vehicle");
if (mapLayer != null) {
mapLayer.setRebuild(true);
map.refresh();
}
}
}
autoRefreshOn();
}
Although I check the busy state with !map.isBusy() the problem persists. How to avoid this problem?