title: Unable to show layers in ArcGIS map after removing tiled map service layer
body: <p>This is a Esri ArcGIS specific question.</p>
  
  <p>I wish to create a function to change basemap.</p>
  
  <p>To test the concept, I created a map and added a ArcGISTiledMapServiceLayer</p>
  
  <pre><code>var tiled = new ArcGISTiledMapServiceLayer('http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer');
  </code></pre>
  
  <p>Next, I will remove the layer and add a ArcGISImageServiceLayer to stimulate a change basemap action</p>
  
  <pre><code>var image = new ArcGISImageServiceLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Toronto/ImageServer", {
    imageServiceParameters: params,
    opacity: 0.75
  });
  </code></pre>
  
  <p>What I realised is after these [<em>adding tiled, removing tiled, adding image</em>] actions, no layers will be rendered</p>
  
  <p>I tested other scenarios and these are the results:</p>
  
  <pre><code>1) If I do not remove the tiled layer, both layers get rendered
  2) If I add only image layer, image layer get rendered
  3) If I add only tiled layer, tiled layer get rendered
  </code></pre>
  
  <p>Do you guys have any advice as to why I cannot perform a remove layer action?</p>
  
  <p>To make this question understandable, I created a sample fiddle that can illustrate my case. Simply remove the removeLayer comment in the fiddle and run it. You will notice as mentioned, nothing will be rendered.</p>
  
  <p><a href="https://jsfiddle.net/82qjh0wg/" rel="nofollow">https://jsfiddle.net/82qjh0wg/</a></p>