none
layers.remove causes "Unable to get property 'currentFrameData' of undefined or null reference" RRS feed

  • Question

  • The problem I have is intermittent.  In getFrameData that is triggered from the render call, I get an exception "Unable to get property 'currentFrameData' of undefined or null reference" after calling maps.layers.remove(...) passing a layer that was previously inserted.  This happens consistently on chrome (54.0.2840.71), only after a refresh on edge (38.14393.0.0), and never on IE 11 (11.447.14393.0 update 11.0.37).

    I'm revisiting some code that worked in July and August, but is now failing.  It works on the second and third layers, but fails on the first.  I can't determine the significance of the difference between the layers and hope someone might recognize this error and point me in the right direction. Any thoughts on how to remove a layer without encountering this exception which leaves the markers in the layer displayed?

    Thursday, November 17, 2016 10:26 PM

Answers

  • I don't know what caused this, but deferring the creation and adding of the layer until after other parts of the application were initialized eliminated the exception.  This makes the first layer work like the second and third layer.
    • Marked as answer by Josh.Cooley Friday, November 18, 2016 8:36 PM
    Friday, November 18, 2016 8:36 PM

All replies

  • I don't know what caused this, but deferring the creation and adding of the layer until after other parts of the application were initialized eliminated the exception.  This makes the first layer work like the second and third layer.
    • Marked as answer by Josh.Cooley Friday, November 18, 2016 8:36 PM
    Friday, November 18, 2016 8:36 PM
  • Hi,

    We are facing same issue. Can anyone find solution for it.

    Thanks!


    Balasaheb



    Tuesday, December 6, 2016 2:09 PM