ThinkGeo.com    |     Documentation    |     Premium Support

Chinese Language Support?

 Hi to all,


 


 Can any body help me MapSuite5.0 will support Chinese Language or  not,i want to display  text in Chinese?Kindly let me know


 


Thank you in advance..


Rajesh


 


 


 



Hello Rajesh,


Thanks for your post, yes we support Chinese characters, you can set:



shapeLayer.Encoding = Encoding.GetEncoding(1256);

Notice, the encoding no is not 1256, you need set the right no you need.


Regards,


Gary



Hi Gary , 
  
  Kindly give me one Example on this… 
  
  
 Thank you in advance 
  
 Regards, 
 Rajesh

Hello Rajesh,


Please check the code below:



 winformsMap1.MapUnit = GeographyUnit.DecimalDegree;
            winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);

            ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer(@"..\..\SampleData\Data\Countries02.shp");
            worldLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.CreateSimpleTextStyle("POI_NAME", "Arial", 10, DrawingFontStyles.Regular, GeoColor.StandardColors.Red, 0, -12);
            worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
            //Chinese encoding page is 936, you can use this.
            worldLayer.Encoding = Encoding.GetEncoding("936");
            WorldMapKitWmsDesktopOverlay worldMapKitDesktopOverlay = new WorldMapKitWmsDesktopOverlay();
            winformsMap1.Overlays.Add(worldMapKitDesktopOverlay);

            LayerOverlay staticOverlay = new LayerOverlay();
            staticOverlay.Layers.Add("WorldLayer", worldLayer);
            
            winformsMap1.Overlays.Add("WorldOverlay", staticOverlay);

            winformsMap1.CurrentExtent = new RectangleShape(-139.2, 92.4, 120.9, -93.2);
            winformsMap1.Refresh();

Regards,


Gary