VERIFIED SOLUTION i
X

How to rotate label text in MapXtreme

UPDATED: August 3, 2017


Code snippet to show rotation of label text:
 
Table table = Session.Current.Catalog.OpenTable(TABLE_PATH);

//Create a new feature layer that references the table and add it to the map
FeatureLayer featureLayer = new FeatureLayer(table);
mapControl1.Map.Layers.Add(featureLayer);

//Create a new label source that references the table
LabelSource lsource = new LabelSource(table);
lsource.DefaultLabelProperties.Layout.Angle = 20.3;

//Create a new label layer and add it to the map
LabelLayer labelLayer = new LabelLayer();
mapControl1.Map.Layers.Insert(0, labelLayer);

//Append the label source to the label layer so that it shows on the map
labelLayer.Sources.Append(lsource);



 

Environment Details

Product Feature: Features
 

Downloads

  • No Downloads