Subject | How to create a PictureMarkerSymbol (Picture Symbol)in ArcGIS server with C# |
---|---|
Author | fei wang |
Date | Oct 13, 2007 |
Message | I had spent long time for finding sample code that can show me how to create a PictureMarkerSymbol in ArcGIS server with C#. However, I couldn't find it. Now, I figured out how to do it. Here I would like to share my code with you. 1) add following two namespaces: using System.Drawing; using System.Drawing.Imaging; 2) create a System.Drawing.Image object: System.Drawing.Image symbolImage = System.Drawing.Image.FromFile("D://yourimagefilepathandname.bmp"); 3) create PictureMarkerSymbol. ESRI.ArcGIS.ADF.ArcGISServer.PictureMarkerSymbol pms = new ESRI.ArcGIS.ADF.ArcGISServer.PictureMarkerSymbol(); pms.Picture = ESRI.ArcGIS.ADF.ArcGISServer.Converter.ToByteArray(symbolImage, System.Drawing.Imaging.ImageFormat.Bmp); pms.Size = 20.0; Happy coding :) FEI |
How to create a PictureMarkerSymbol (Picture Symbol)in ArcGIS server with C#
最新推荐文章于 2020-08-01 16:22:41 发布