Removing layers in v8API RRS feed

  • Question

  • How does one do this? i.e.what is the "opposite" of map.layers.insert(layer); code snippet present in some of the SDK examples.
    Saturday, April 9, 2016 7:17 PM


  • Currently about 2/3rds of the API is documented so far. To remove a layer from the map use


    Alternatively, you can also use


    The map.layers property has the following methods available;

    • clear()
    • indexOf(layer)
    • insert(layer, index?)
    • insertAll(arrayOfLayers, index?)
    • remove(layer)
    • removeAt(layerIndex)
    • slice(startIndex, endIndex)

    Monday, April 11, 2016 4:17 PM