insertLayer method

void insertLayer(
  1. MLNStyleLayer layer, {
  2. required int atIndex,
})

Inserts a new layer into the style at the given index.

Note: Adding the same layer instance more than once will result in a MLNRedundantLayerException. Reusing the same layer identifer, even with different layer instances, will also result in an exception.

Note: Layers should be added in MLNMapViewDelegate/mapView:didFinishLoadingStyle: or MLNMapViewDelegate/mapViewDidFinishLoadingMap: to ensure that the map has loaded the style and is ready to accept a new layer.

@param layer The layer to insert. @param index The index at which to insert the layer. An index of 0 would send the layer to the back; an index equal to the number of objects in the layers property would bring the layer to the front.

Implementation

void insertLayer(MLNStyleLayer layer, {required int atIndex}) {
_objc_msgSend_djsa9o(this.ref.pointer, _sel_insertLayer_atIndex_, layer.ref.pointer, atIndex);

}