質問

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?

役に立ちましたか?

解決 2

I figured it out!

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

他のヒント

I know there's an accepted answer here, but there is a much easier way to refresh the layer of the map. When you refresh the extent of the map, all Layers will be newly loaded.

map.setExtent(map.extent);

This just loads the existing extent again and refresh the layers. I used this to reload the map after hiding the basemaplayers.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top