ArcObjects Library Reference (Controls)  

ITOCBuddy2.IsLayerVisibleAtScale Method

The TOCControl calls this method to ask the buddy if a layer is visible at the specified scale.

[Visual Basic .NET]
Public Function IsLayerVisibleAtScale ( _
    ByVal pLayer As ILayer, _
    ByVal scale As Double _
) As Boolean
[C#]
public bool IsLayerVisibleAtScale (
    ILayer pLayer,
    double scale
);
[C++]
HRESULT IsLayerVisibleAtScale(
  ILayer* pLayer,
  double scale,
  VARIANT_BOOL* visibility
);
[C++]

Parameters

pLayer [in]

  pLayer is a parameter of type ILayer

scale [in]   scale is a parameter of type double visibility [out, retval]   visibility is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine.

Description

The IsLayerVisibleAtScale method, called by the TOCControl, returns whether the specified layer is visible at the specified scale.

A layer in a globe has IGlobeLayerProperties::MinimumDistance and IGlobeLayerProperties::MaximumDistance properties. The IsLayerVisibleAtScale method allows the GlobeControl to override the ILayer::MinimumScale and ILayer::MaximumScale properties with the  MinimumDistance and MaximumDistance properties to correctly manage the visibility of the layer.

See Also

ITOCBuddy2 Interface