zoukankan      html  css  js  c++  java
  • ArcGIS Pro二次开发-插入文本,图例和指北针

    // Add text for title
                 Coordinate2D titleTxt_ll = new Coordinate2D(4.5, 9.5);
                 CIMTextSymbol arial36bold = SymbolFactory.Instance.ConstructTextSymbol(ColorFactory.Instance.BlueRGB, 80, "Arial", "Bold");
                 GraphicElement titleTxtElm = LayoutElementFactory.Instance.CreatePointTextGraphicElement(newLayout, titleTxt_ll, "Census Data", arial36bold);
                 titleTxtElm.SetName("Title");
    
                 // Add north arrow
                 // Reference a North Arrow in a style
                 StyleProjectItem stylePrjItm = Project.Current.GetItems<StyleProjectItem>().FirstOrDefault(item => item.Name == "ArcGIS 2D");
                 NorthArrowStyleItem naStyleItm = stylePrjItm.SearchNorthArrows("ArcGIS North 8")[0];
    
                 // Set the center coordinate and create the arrow on the layout
                 Coordinate2D center = new Coordinate2D(15, 7);
                 NorthArrow arrowElm = LayoutElementFactory.Instance.CreateNorthArrow(newLayout, center, newMapframe, naStyleItm);
                 arrowElm.SetName("New North Arrow");
                 arrowElm.SetHeight(2);
     // Add legend - first build 2D envelope geometry
                 Coordinate2D leg_ll = new Coordinate2D(13.5, 0.5);
                 Coordinate2D leg_ur = new Coordinate2D(16.5, 4.0);
                 Envelope leg_env = EnvelopeBuilder.CreateEnvelope(leg_ll, leg_ur);
    
                 // Create legend
                 Legend legendElm = LayoutElementFactory.Instance.CreateLegend(newLayout, leg_env, newMapframe);
                 legendElm.SetVisible(true);
                 legendElm.SetName("New Legend");
    
                 return newLayout;
              });
    
             var layoutPane = await ProApp.Panes.CreateLayoutPaneAsync(newLayout);
  • 相关阅读:
    k8s中service 的iptables
    xbak 备份
    tcp/ip 拥塞控制、重传、丢包、优化
    mysql 主从详细原理 以及prom 监控的对象
    内核参数优化limit.conf与sysctl.conf
    k8s 中(生产|测试)环境隔离问题
    mysql锁以及配置优化
    mysql5.6迁移mysql5.7(生产中、短中断)
    mysql 日志方面与备份、恢复
    Apollo&&Eureka安装配置
  • 原文地址:https://www.cnblogs.com/gisoracle/p/12504986.html
Copyright © 2011-2022 走看看