概述
接口一:
public Layer CreateLayer( Uri dataUri, ILayerContainerEdit mapOrGroupLayer, int index, string layerName )
URI参数说明:
A FeatureClass in a FileGeodatabase | C:DataMyFileGDB.gdbCensus |
A shape file in a folder | \MachineSharedFolderMySpatialData.dbf |
A RasterDataset in a FileGeodatabase | C:DataMyFileGDB.gdbDEM |
A FeatureClass from a SDE | C:ConnectionsMySDEConnection.sdeRoads |
An image file in a folder | \MachineSharedFolderImagery.tif |
A .lyrx or .lpkx file | \MachineSharedFolderFires.lyrx |
A map service layer | http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer |
A feature layer off a map or feature service | http://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 FileGeodatabase | C:DataMyFileGDB.gdbCensus |
A FeatureClass from a SDE | C: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 service | http://sampleserver6.arcgisonline.com/arcgis/rest/services/NapervilleShelters/FeatureServer/0 |
最后
以上就是甜美朋友为你收集整理的arcgis pro sdk 创建要素类图层的全部内容,希望文章能够帮你解决arcgis pro sdk 创建要素类图层所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复