VERIFIED SOLUTION i
X

How to set the AddMapTool's composite style in a desktop application using MapXtreme

UPDATED: September 19, 2017


Once the AddMapTool is set up, add this code to the MapForm Load function.

Note: A style must be defined for AreaStyle, LineStyle, TextStyle and PointStyle in order to set the AddMapTool's CompositeStyle.


MapInfo.Styles.AreaStyle areaStyle = new MapInfo.Styles.AreaStyle();
MapInfo.Styles.SimpleLineStyle lineStyle = new MapInfo.Styles.SimpleLineStyle();
MapInfo.Styles.TextStyle textStyle = new MapInfo.Styles.TextStyle();
MapInfo.Styles.SimpleVectorPointStyle pointStyle = new MapInfo.Styles.SimpleVectorPointStyle();

MapInfo.Styles.CompositeStyle cs = new MapInfo.Styles.CompositeStyle(areaStyle, lineStyle, textStyle, pointStyle);
this.mapControl1.Tools.AddMapToolProperties.CompositeStyle = cs;

Environment Details

Products affected: MapXtreme™

Downloads

  • No Downloads