首页 > 其他 > 详细

ArcGIS Pro-SetCustomFullExtent

时间:2020-04-03 22:20:49      阅读:63      评论:0      收藏:0      [点我收藏+]
LayoutProjectItem layoutItem = Project.Current.GetItems<LayoutProjectItem>().FirstOrDefault(item => item.Name.Equals("Standard"));
Layout layout = layoutItem.GetLayout();
MapFrame mapFrame = layout.FindElement("FrameName") as MapFrame;
//Get map 
var mapFrameMap = mapFrame.Map;
//Get the specific layer you want from the map
var lyrOfInterest = mapFrameMap.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault();

using (RowCursor jCursor1 = ExtentFeatureClass.Search(queryFilter, true))
{
while (jCursor1.MoveNext())
{

var RTSNUM = "RTSNumber";
using (Feature feature = (Feature)jCursor1.Current)
{
// Process the feature. For example...
var pin = feature[RTSNUM].ToString();
Geometry geo2 = feature.GetShape().Clone();
var selectionEnvelope2 = geo2.Extent;
mapFrameMap.SetCustomFullExtent(selectionEnvelope2);
mapFrame.SetCamera(selectionEnvelope2);

 

ArcGIS Pro-SetCustomFullExtent

原文:https://www.cnblogs.com/gisoracle/p/12629157.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!