{
this.m_bSplitByPoint = true;
}
if (iType == 2)
{
this.m_bSplitByline = true;
}
这是上层实现代码。
下面是基层实现的,但不过还要处理鼠标事件,这些代码就不贴了。
下面是用点打断线的代码:
if (pMap == null || pFeature == null)
{
return false;
}
IFeatureEdit pFeatureEdit = null;
pFeatureEdit = pFeature as IFeatureEdit;
ISet pSplitSet;
try
{
pSplitSet = pFeatureEdit.Split(pSplitPoint);
}
catch
{
return false;
}
pSplitSet.Reset();
IFeature pSplitFeature = null;
pSplitFeature = pSplitSet.Next() as IFeature;
while (pSplitFeature != null)
{
CreateSplitFeature(pMap,pSplitFeature.ShapeCopy);
FlashGeometry(pMap,pSplitFeature.ShapeCopy);
pSplitFeature = pSplitSet.Next() as IFeature;
}
return true;
这谢代码以调试通过。
[ 本帖最后由 qjhli2007 于 2007-8-25 14:49 编辑 ]
实现类似与ArcMap中的split tool的功能-----用点打断线
最新推荐文章于 2021-11-27 19:04:54 发布