public MapTool1()
{
IsSketchTool = true;
SketchType = SketchGeometryType.Line;
SketchOutputMode = SketchOutputMode.Map;
}
protected override Task OnToolActivateAsync(bool active)
{
return base.OnToolActivateAsync(active);
}
protected async override Task<bool> OnSketchCompleteAsync(Geometry geometry)
{
var polyline = geometry as Polyline;
if (polyline != null)
{
var sR = polyline.SpatialReference;
// make more vertices ... using tolerance to cover projected / non-projected coord systems
var denseDistance = sR.XYTolerance * 1000;
var denseLine = GeometryEngine.Instance.DensifyByLength(polyline, denseDistance) as Polyline;
await QueuedTask.Run(() =>
{
//var movedZup = GeometryEngine.Instance.Move(result.Geometry, 0, 0, 1) as Polyline;
ActiveMapView.AddOverlay(polyline);
});
}
return true;
}
ArcGIS Pro屏幕上临时画一条线
原创gisoracleplus ©著作权
©著作权归作者所有:来自51CTO博客作者gisoracleplus的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章