手机版

东华理工GIS二次开发实验报告(14)

发布时间:2021-06-06   来源:未知    
字号:

57 if(symbol == null) 58 return false;

59 IFeatureLayer featureLayer = layer as IFeatureLayer; 60 IFeatureClass featureClass = featureLayer.FeatureClass; 61 if(featureClass == null) 62 return false;

63 esriGeometryType geoType = featureClass.ShapeType; 64 switch(geoType) 65 {

66 case esriGeometryType.esriGeometryPoint: 67 {

68 IMarkerSymbol markerSymbol = symbol as IMarkerSymbol; 69 markerSymbol.Color = color; 70 break; 71 }

72 case esriGeometryType.esriGeometryMultipoint: 73 {

74 IMarkerSymbol markerSymbol = symbol as IMarkerSymbol; 75 break; 76 }

77 case esriGeometryType.esriGeometryPolyline: 78 {

79 ISimpleLineSymbol simpleLineSymbol = 80

symbol as ISimpleLineSymbol;

81 simpleLineSymbol.Color = color; 82 break; 83 }

84 case esriGeometryType.esriGeometryPolygon: 85 {

86 IFillSymbol fillSymbol = symbol as IFillSymbol; 87 fillSymbol.Color = color; 88 break; 89 } 90 default:

91 return false; 92 }

93 ISimpleRenderer simpleRenderer = new SimpleRendererClass(); 94 simpleRenderer.Symbol = symbol; 95 IFeatureRenderer featureRenderer = 96

simpleRenderer as IFeatureRenderer;

97 if(featureRenderer == null) 98 return false;

99 IGeoFeatureLayer geoFeatureLayer = featureLayer as IGeoFeatureLayer;

东华理工GIS二次开发实验报告(14).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
×
二维码
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)