Global Navigation Bar

MapInfo Products Knowledge Base


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:

Hide details for C# Code: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);
    Show details for VB.Net Code:VB.Net Code:

      Last Modified: 04/13/2006 02:44:32 PM
      Global Navigation Bar