Product: MapXtreme 2004/2005
Version: 6.0, 6.1, 6.2, 6.5
Platform: Not Platform Related
Category: Labels
Summary:
How to label a feature with more than one field.
Question:
How to label a feature with more than one field.
Answer:
C# Code:
MapInfo.Data.Table USACapsTable = MapInfo.Engine.Session.Current.Catalog.GetTable("USA_Caps");
MapInfo.Mapping.LabelLayer lblLayer = new MapInfo.Mapping.LabelLayer("Labels");
MapInfo.Mapping.LabelSource lblSource = new MapInfo.Mapping.LabelSource(USACapsTable);
lblSource.DefaultLabelProperties.Caption = "Capital + " + " char(13)" + " + State";
lblLayer.Sources.Append(lblSource);
this.mapControl1.Map.Layers.Add(lblLayer);
VB.Net Code:
Last Modified: 04/13/2006 02:44:32 PM
|