Im getting javascript error where i click a button to reload a map.
Message: Tried to register widget with id==map_infowindow but that id is already registered
try
{
map.destroy();
}
catch(e)
{}
map = new esri.Map("map", {
center: [-94.028227,38.190532], // long, lat
zoom: 4});
Map loads well for the first time. However, second time it throws that error. I tried using map.destroy() to destroy the map instance but it doesnt work. How shud i overcome this? Thx in advance for ur help.