我是靠谱客的博主 甜美朋友,最近开发中收集的这篇文章主要介绍arcgis pro sdk 创建要素类图层,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

接口一:

public Layer CreateLayer( 
   Uri dataUri,
   ILayerContainerEdit mapOrGroupLayer,
   int index,
   string layerName
)

URI参数说明:

A FeatureClass in a FileGeodatabaseC:DataMyFileGDB.gdbCensus
A shape file in a folder\MachineSharedFolderMySpatialData.dbf
A RasterDataset in a FileGeodatabaseC:DataMyFileGDB.gdbDEM
A FeatureClass from a SDEC:ConnectionsMySDEConnection.sdeRoads
An image file in a folder\MachineSharedFolderImagery.tif
A .lyrx or .lpkx file\MachineSharedFolderFires.lyrx
A map service layerhttp://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer
A feature layer off a map or feature servicehttp://sampleserver6.arcgisonline.com/arcgis/rest/services/NapervilleShelters/FeatureServer/0

示例:

var flyrCreatnParam = new FeatureLayerCreationParams(new Uri(@"c:dataworld.gdbcities"))
{
  Name = "World Cities",
  IsVisible = false,
  MinimumScale = 1000000,
  MaximumScale = 5000,
  DefinitionFilter = new CIMDefinitionFilter()
  {
    DefinitionExpression = "Population > 100000",
    Name = "More than 100k"
  },
  RendererDefinition = new SimpleRendererDefinition()
  {
    SymbolTemplate = SymbolFactory.Instance.ConstructPointSymbol(
      CIMColor.CreateRGBColor(255, 0, 0), 8, SimpleMarkerStyle.Hexagon).MakeSymbolReference()
  }
};

var featureLayer = LayerFactory.Instance.CreateLayer<FeatureLayer>(
  flyrCreatnParam, map, LayerPosition.AutoArrange);

接口二:

public FeatureLayer CreateFeatureLayer( 
   FeatureClass featureClass,
   ILayerContainerEdit mapOrGroupLayer,
   int index,
   string layerName,
   RendererDefinition rendererDefinition
)
public FeatureLayer CreateFeatureLayer( 
   Uri dataUri,
   ILayerContainerEdit mapOrGroupLayer,
   int index,
   string layerName,
   RendererDefinition rendererDefinition
)

URI说明:

A FeatureClass in a FileGeodatabaseC:DataMyFileGDB.gdbCensus
A FeatureClass from a SDEC:ConnectionsMySDEConnection.sdeRoads
A shape file in a folder\MachineSharedFolderMySpatialData.dbf
A .lyrx or .lpkx file\MachineSharedFolderFires.lyrx
A feature layer off a map or feature servicehttp://sampleserver6.arcgisonline.com/arcgis/rest/services/NapervilleShelters/FeatureServer/0

最后

以上就是甜美朋友为你收集整理的arcgis pro sdk 创建要素类图层的全部内容,希望文章能够帮你解决arcgis pro sdk 创建要素类图层所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(32)

评论列表共有 0 条评论

立即
投稿
返回
顶部