ArcGIS Pro SDK MapSeries
You can create multiple map series but a layout can only have one associated map series at a time. There are two basic ways you can work with a map series. First, you can reference the layout's currently active map series using the MapSeries property on the Layout. This returns a map series CIM definition. Changes can be made and then pushed back to the Layout using the SetMapSeries() method. Second, you can create a new map series using a constructor like CreateSpatialMapSeries. This will also return a CIM definition that can be modified and pushed back to the Layout using the SetMapSeries() method. To export a map series you need to contruct an ExportFormat and a MapSeriesExportOptions. Example MapSeries_GetSetDefinition C# //Get and modify a map series CIM definition and set the changes back to the layout //Perform on the worker thread await QueuedTask.Run(() => { MapSeries MS = layout.MapSeries as MapSeries; CIMMapSeries CIM_MS = MS.GetDefinition(); CIM_MS.Enabled = false; MS.SetDefinition(CIM_MS); layout.SetMapSeries(MS); }); Modify an existing map series C# //Modify the currently active map series and changes its sort field and page number field. //Perform on the worker thread await QueuedTask.Run(() => { SpatialMapSeries SMS = layout.MapSeries as SpatialMapSeries; //cast as spatial map seris for additional members SMS.SortField = "State_Name"; SMS.SortAscending = true; SMS.PageNumberField = "PageNum"; //Overwrite the current map series with these new settings layout.SetMapSeries(SMS); }); Create a new spatial map series C# // This example create a new spatial map series and then applies it to the active layout. This will automatically // overwrite an existing map series if one is already present. //Reference map frame and index layer MapFrame mf = layout.FindElement("Map Frame") as MapFrame; Map m = mf.Map; BasicFeatureLayer indexLyr = m.FindLayers("Countries").FirstOrDefault() as BasicFeatureLayer; //Construct map series on worker thread await QueuedTask.Run(() => { //SpatialMapSeries constructor - required parameters SpatialMapSeries SMS = MapSeries.CreateSpatialMapSeries(layout, mf, indexLyr, "Name"); //Set optional, non-default values SMS.CategoryField = "Continent"; SMS.SortField = "Population"; SMS.ExtentOptions = ExtentFitType.BestFit; SMS.MarginType = ArcGIS.Core.CIM.UnitType.PageUnits; SMS.MarginUnits = ArcGIS.Core.Geometry.LinearUnit.Centimeters; SMS.Margin = 1; SMS.ScaleRounding = 1000; layout.SetMapSeries(SMS); //Overwrite existing map series. });
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
2018-02-28 昆明地铁2019
2016-02-28 andriod 读取通讯录
2016-02-28 android 管理wifi
2016-02-28 andriod 剪贴板操作
2016-02-28 andriod绘制图形
2016-02-28 andriod读写XML
2016-02-28 androd 获得wifi列表