LegendTitle property

MapPoint North America 2006 SDK

Returns or sets the name of the data map that appears in the legend. If not set, MapPoint generates a default name. When the IsGeographyForEveryZoomLevel property of the DataMap object is True, this property is read-only. Read/write String.

Applies to

Objects:  DataMap




Part Description
object Required. An expression that returns a DataMap object.


[Microsoft Visual Basic 6.0]
Sub GetLegendTitle()   Dim objApp As New MapPoint.Application   Dim objDM As MapPoint.DataMap
  Set objDM = objApp.OpenMap(objApp.Path & "\Samples\Sales.ptm").DataSets("SampleData").DataMap

  'Check the legend title   MsgBox objDM.LegendTitle
  'Change the legend title   objDM.LegendTitle = "New Legend Title"
  'Check the new legend title   MsgBox objDM.LegendTitle End Sub
void GetLegendTitle() { MapPoint.ApplicationClass objApp = new MapPoint.ApplicationClass(); MapPoint.DataMap objDM = null; object key = "SampleData"; objDM = objApp.OpenMap(objApp.Path + "\\Samples\\Sales.ptm", false).DataSets.get_Item(ref key).DataMap; //Check the legend title - assume System.Windows.Forms.dll is referenced System.Windows.Forms.MessageBox.Show(objDM.LegendTitle); //Change the legend title objDM.LegendTitle = "New Legend Title"; //Check the new legend title System.Windows.Forms.MessageBox.Show(objDM.LegendTitle); }