Interface ILcdInitialLayerIndexProvider

All Known Implementing Classes:
TLspInitialLayerIndexProvider

public interface ILcdInitialLayerIndexProvider

This provider allows to insert layers directly in their most desired index in a ILcdLayerTreeNode when no index is explicitly specified. This is convenient to centralize the logic to decide where to put a new layer in the layer stack. When for example inserting a layer with filled areas in a view that contains only layers with points, it would make sense to insert the filled areas below the points. As such, the filled areas will not obscure the points, keeping both visible.

Since:
2012.0
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Provides the most desired index when about to insert a new layer.
  • Method Details

    • getInitialLayerIndex

      int getInitialLayerIndex(ILcdLayer aLayer, ILcdLayerTreeNode aLayerNode)

      Provides the most desired index when about to insert a new layer.

      Parameters:
      aLayer - The layer for which to determine a good initial index.
      aLayerNode - The layer node in which the layer is about to be inserted. This could be the root node of a view, or any of its sub-nodes.
      Returns:
      The preferred index to insert aLayer into aLayerNode, in the interval [0, aLayerNode.layerCount()]. A value of aLayered.layerCount() means the layer is inserted on top of the layer stack.