AnsweredAssumed Answered

Exception after remove and add a layer to web map / javascript

Question asked by piterpaulppp on Dec 20, 2016
Latest reply on Dec 22, 2016 by rscheitlin

Hi,

 

Simple question: What is the correct way to remove a layer (ArcGISDynamicMapServiceLayer)?

 

We do constantly add and remove layers to/from a map object. We noticed that after remove and add there is an exception

Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
at Object._onLoadHandler (https://js.arcgis.com/3.17/init.js:1857:295)
at HTMLImageElement.<anonymous> (https://js.arcgis.com/3.17/init.js:63:154)

 

What is wrong? What is the meaning?

Outcomes