Search code examples
javascriptarcgisesriarcgis-js-api

ArcGIS Javascript - How do I refresh static map?


I have a page that uses ArcGIS Javascript when page loads first time, map on the page loads just fine. I have a drop down box that controllers what to show on the map and ajax event handler attached to that drop down box when some other option is being selected in that drop down box function

function ajaxOnComplete() {  } 

gets called. How in that function do I ask ArcGIS Javascript to reload its static map?


Solution

  • I figured it out!

    function ajaxOnComplete() 
    {
       map.destroy();
       dojo.addOnLoad(init);
    }