本文整理汇总了C#中IView.getLayer方法的典型用法代码示例。如果您正苦于以下问题:C# IView.getLayer方法的具体用法?C# IView.getLayer怎么用?C# IView.getLayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IView
的用法示例。
在下文中一共展示了IView.getLayer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StrataOnTunnel
// tunnelX, tunnelZ is the coordinate of tunnel crown
// h is the height of tunnel
//
public static List<Result> StrataOnTunnel(double tunnelX, double tunnelZ, double h,
IView profileView, string stLayerID, Setting setting)
{
IGraphicsLayer gLayerSt = profileView.getLayer(stLayerID);
if (gLayerSt == null)
return null;
List<Result> results = new List<Result>();
Project prj = Globals.project;
Domain geology = prj.getDomain(DomainType.Geology);
DGObjectsCollection stratum = geology.getObjects("Stratum");
var stratumList = stratum.merge();
foreach (DGObject obj in stratumList)
{
Stratum strata = obj as Stratum;
IGraphicCollection gc = gLayerSt.getGraphics(strata);
if (gc == null)
continue;
Result result = StratumOnTunnel(tunnelX, tunnelZ, h, gc, profileView.spatialReference);
if (result != null)
{
result.StratumObj = gLayerSt.getObject(gc[0]);
if (result.Depth > 0 || setting.AllStrata)
results.Add(result);
}
}
return results;
}
示例2: getDemoLayer
//获取新建图层
IGraphicsLayer getDemoLayer(IView view, string layerID)
{
IGraphicsLayer gLayer = view.getLayer(layerID);
if (gLayer == null)
{
gLayer = Runtime.graphicEngine.newGraphicsLayer(
layerID, layerID);
var sym_fill = GraphicsUtil.GetDefaultFillSymbol();
var renderer = Runtime.graphicEngine.newSimpleRenderer(sym_fill);
gLayer.setRenderer(renderer);
gLayer.Opacity = 0.9;
view.addLayer(gLayer);
}
return gLayer;
}
示例3: StratumTop
// Get strata top coordinate at the specified location
//
public static double? StratumTop(double tunnelX, IView profileView, string stLayerID)
{
IGraphicsLayer gLayerSt = profileView.getLayer(stLayerID);
if (gLayerSt == null)
return null;
List<double> results = new List<double>();
Project prj = Globals.project;
Domain geology = prj.getDomain(DomainType.Geology);
DGObjectsCollection stratum = geology.getObjects("Stratum");
List<DGObject> stratumList = stratum.merge();
foreach (DGObject obj in stratumList)
{
Stratum strata = obj as Stratum;
IGraphicCollection gc = gLayerSt.getGraphics(strata);
if (gc == null)
continue;
double? top = StratumTop(tunnelX, gc, profileView.spatialReference);
if (top != null)
{
results.Add(top.Value);
}
}
if (results.Count == 0)
return null;
results.Sort();
return results[results.Count - 1];
}
示例4: getBoreholeLayer
IGraphicsLayer getBoreholeLayer(IView view, string layerID)
{
IGraphicsLayer gLayerBh = view.getLayer(layerID);
if (gLayerBh == null)
{
gLayerBh = Runtime.graphicEngine.newGraphicsLayer(
layerID, layerID);
var sym_fill = GraphicsUtil.GetDefaultFillSymbol();
var renderer = Runtime.graphicEngine.newSimpleRenderer(sym_fill);
gLayerBh.setRenderer(renderer);
view.addLayer(gLayerBh);
}
return gLayerBh;
}