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:

Show details for C# Code:C# Code:
    Hide details for VB.Net Code:VB.Net Code:

    Dim USACapsTable As MapInfo.Data.Table = MapInfo.Engine.Session.Current.Catalog.GetTable("USA_Caps")

    Dim lblLayer As MapInfo.Mapping.LabelLayer = New MapInfo.Mapping.LabelLayer("Labels")
    Dim lblSource As MapInfo.Mapping.LabelSource = New MapInfo.Mapping.LabelSource(USACapsTable)

    lblSource.DefaultLabelProperties.Caption = "Capital + " & " char(13)" & " + State"

    lblLayer.Sources.Append(lblSource)
    MapControl1.Map.Layers.Add(lblLayer)

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