using ESRI.ArcGIS; using ESRI.ArcGIS.Carto; IWorkspaceFactory featureWorkspace = (ESRI.ArcGIS.Geodatabase.IFeatureWorkspace)workspaceFactory.OpenFromFile(System.IO.Path.GetDirectoryName(@"C:\work\mypoint.shp"), 0); IFeatureClass featureClass = featureWorkspace.OpenFeatureClass(System.IO.Path.GetFileNameWithoutExtension(@"mypoint")); IFeatureLayer featureLayer = new ESRI.ArcGIS.Carto.FeatureLayerClass(); featureLayer.FeatureClass = featureClass; featureLayer.Name = "ポイント"; featureLayer.Visible = true; IRgbColor mskrgb = new RgbColorClass(); mskrgb.Red = 255; mskrgb.Green = 255; mskrgb.Blue = 255; IPictureMarkerSymbol bitmapPictureMarkerSymbolCls = new PictureMarkerSymbolClass(); bitmapPictureMarkerSymbolCls.CreateMarkerSymbolFromFile(esriIPictureType.esriIPictureBitmap, "c:\\work\\flag.bmp"); bitmapPictureMarkerSymbolCls.Angle = 0; bitmapPictureMarkerSymbolCls.BitmapTransparencyColor = mskrgb; bitmapPictureMarkerSymbolCls.Size = 32; bitmapPictureMarkerSymbolCls.XOffset = 0; bitmapPictureMarkerSymbolCls.YOffset = 0; IGeoFeatureLayer pGeoFeatureLayer = (IGeoFeatureLayer)featureLayer; IFeatureRenderer pSimpleRenderer = new SimpleRenderer(); pSimpleRenderer.Symbol = (ISymbol)bitmapPictureMarkerSymbolCls; pGeoFeatureLayer.Renderer = (IFeatureRenderer)pSimpleRenderer; axMapControl1.AddLayer(featureLayer);