Drawing layers

Functions

void AxMap.ClearDrawing (int DrawHandle)
 Clears all drawings on the specified drawing layer, and removes the drawing layer. The drawing handle will no longer be valid. Call AxMap.NewDrawing again to create a new drawing layer to continue adding new elements. More...
 
void AxMap.ClearDrawingLabels (int DrawHandle)
 Clears labels on the specified drawing layer. More...
 
void AxMap.ClearDrawings ()
 Clears all drawings on all drawing layers, and removes all drawing layers. This method is slower than using ClearDrawing on a specific layer. Call AxMap.NewDrawing again to create a new drawing layer to continue adding new elements. More...
 
void AxMap.DrawCircle (double x, double y, double pixelRadius, uint Color, bool fill)
 Draws a circle on the last drawing layer created by AxMap.NewDrawing More...
 
void AxMap.DrawCircleEx (int LayerHandle, double x, double y, double pixelRadius, uint Color, bool fill)
 Draws a circle on the specified drawing layer. More...
 
int AxMap.DrawLabel (string Text, double x, double y, double Rotation)
 Draws a label on the current drawing layer. More...
 
int AxMap.DrawLabelEx (int DrawHandle, string Text, double x, double y, double Rotation)
 Draws a label on the specified drawing layer. More...
 
void AxMap.DrawLine (double x1, double y1, double x2, double y2, int pixelWidth, uint Color)
 Draws a line on the last drawing layer created using AxMap.NewDrawing. More...
 
void AxMap.DrawLineEx (int LayerHandle, double x1, double y1, double x2, double y2, int pixelWidth, uint Color)
 Draws a line on the specified drawing layer. More...
 
void AxMap.DrawPoint (double x, double y, int pixelSize, uint Color)
 Draws a point on the last drawing layer created by AxMap.NewDrawing. More...
 
void AxMap.DrawPointEx (int LayerHandle, double x, double y, int pixelSize, uint Color)
 Draws a point on the specified drawing layer. More...
 
void AxMap.DrawPolygon (ref object xPoints, ref object yPoints, int numPoints, uint Color, bool fill)
 Draws a polygon on the last drawing layer created using AxMap.NewDrawing. More...
 
void AxMap.DrawPolygonEx (int LayerHandle, ref object xPoints, ref object yPoints, int numPoints, uint Color, bool fill)
 Draws a polygon on the specified drawing layer. More...
 
void AxMap.DrawWideCircle (double x, double y, double pixelRadius, uint Color, bool fill, short Width)
 Draws a circle with custom outline width on the last drawing layer created by AxMap.NewDrawing. More...
 
void AxMap.DrawWideCircleEx (int LayerHandle, double x, double y, double radius, uint Color, bool fill, short OutlineWidth)
 Draws a circle with custom outline width on the specified drawing layer. More...
 
void AxMap.DrawWidePolygon (ref object xPoints, ref object yPoints, int numPoints, uint Color, bool fill, short Width)
 Draws a polygon with custom width of outline on the last drawing layer created using AxMap.NewDrawing. More...
 
void AxMap.DrawWidePolygonEx (int LayerHandle, ref object xPoints, ref object yPoints, int numPoints, uint Color, bool fill, short OutlineWidth)
 Draws a polygon with custom width of outline on the last drawing layer created using AxMap.NewDrawing. More...
 
string AxMap.get_DrawingKey (int DrawHandle)
 Gets the drawing key which may be used by the programmer to store any string for a drawing layer with specified handle. More...
 
Labels AxMap.get_DrawingLabels (int DrawingLayerIndex)
 Gets labels associated with the drawing layer. More...
 
bool AxMap.get_DrawingLabelsVisible (int DrawHandle)
 Gets a boolean value which indicates whether labels of the drawing layer are visible. More...
 
int AxMap.NewDrawing (tkDrawReferenceList projection)
 Creates a new drawing layer on the map returning its handle. More...
 
void AxMap.set_DrawingKey (int DrawHandle, string newValue)
 Sets the drawing key may be used by the programmer to store any string for a drawing layer with specified handle. More...
 
void AxMap.set_DrawingLabels (int DrawingLayerIndex, Labels newValue)
 Replaces the labels associated with the drawing layer. More...
 
void AxMap.set_DrawingLabelsVisible (int DrawHandle, bool newValue)
 Sets a boolean value which indicates whether labels of the drawing layer are visible. More...
 
void AxMap.SetDrawingLayerVisible (int LayerHandle, bool Visible)
 Sets the boolean value which indicates whether the labels of the drawing layer are visible. More...
 

Detailed Description

Here is a list of methods and properties to interact with the drawing layers of the map. The drawing layers are more transient that the standard layers, intended for fast drawing of temporary elements on top of the map. This module is a part of the documentation of AxMap class.

dot_inline_dotgraph_7.png

Graph description

Function Documentation

◆ ClearDrawing()

void AxMap.ClearDrawing ( int  DrawHandle)

Clears all drawings on the specified drawing layer, and removes the drawing layer. The drawing handle will no longer be valid. Call AxMap.NewDrawing again to create a new drawing layer to continue adding new elements.

Parameters
DrawHandleDrawing handle of the drawing layer to be cleared (and removed).

◆ ClearDrawingLabels()

void AxMap.ClearDrawingLabels ( int  DrawHandle)

Clears labels on the specified drawing layer.

Parameters
DrawHandleThe handle of the drawing layer returned by AxMap.NewDrawing method.

◆ ClearDrawings()

void AxMap.ClearDrawings ( )

Clears all drawings on all drawing layers, and removes all drawing layers. This method is slower than using ClearDrawing on a specific layer. Call AxMap.NewDrawing again to create a new drawing layer to continue adding new elements.

Examples:
Tracking.cs.

◆ DrawCircle()

void AxMap.DrawCircle ( double  x,
double  y,
double  pixelRadius,
uint  Color,
bool  fill 
)

Draws a circle on the last drawing layer created by AxMap.NewDrawing

Parameters
xCenter x coordinate for the circle to be drawn.
yCenter y coordinate for the circle to be drawn.
pixelRadiusRadius in pixels of the circle to be drawn.
ColorColor of the circle to be drawn. This is a UInt32 representation of an RGB color.
fillBoolean value which determines whether the circle will be drawn with a fill or not.

◆ DrawCircleEx()

void AxMap.DrawCircleEx ( int  LayerHandle,
double  x,
double  y,
double  pixelRadius,
uint  Color,
bool  fill 
)

Draws a circle on the specified drawing layer.

Parameters
LayerHandleThe handle of the drawing layer created with AxMap.NewDrawing call.
xCenter x coordinate for the circle to be drawn.
yCenter y coordinate for the circle to be drawn.
pixelRadiusRadius in pixels of the circle to be drawn.
ColorColor of the circle to be drawn. This is a UInt32 representation of an RGB color.
fillBoolean value which determines whether the circle will be drawn with a fill or not.
Examples:
Tracking.cs.

◆ DrawLabel()

int AxMap.DrawLabel ( string  Text,
double  x,
double  y,
double  Rotation 
)

Draws a label on the current drawing layer.

Parameters
TextText of the label.
xX coordinate, in either screen or map units depending on the parameters of AxMap.NewDrawing used to create the layer.
yY coordinate, in either screen or map units depending on the parameters of AxMap.NewDrawing used to create the layer.
RotationRotation angle in degrees.
Returns
Layer handle if the label was added successfully or -1 on failure.
New API 4.9.3:
Added in version 4.9.3

◆ DrawLabelEx()

int AxMap.DrawLabelEx ( int  DrawHandle,
string  Text,
double  x,
double  y,
double  Rotation 
)

Draws a label on the specified drawing layer.

Parameters
DrawHandleHandle of the layer.
TextText of the label.
xX coordinate, in either screen or map units depending on the parameters of AxMap.NewDrawing used to create the layer.
yY coordinate, in either screen or map units depending on the parameters of AxMap.NewDrawing used to create the layer.
RotationRotation angle in degrees.
Returns
Layer handle if the label was added successfully or -1 on failure.
New API 4.9.3:
Added in version 4.9.3

◆ DrawLine()

void AxMap.DrawLine ( double  x1,
double  y1,
double  x2,
double  y2,
int  pixelWidth,
uint  Color 
)

Draws a line on the last drawing layer created using AxMap.NewDrawing.

Parameters
x1X coordinate of the first point used to draw the line
y1Y coordinate of the first point used to draw the line.
x2X coordinate of the second point used to draw the line.
y2Y coordinate of the second point used to draw the line.
pixelWidthWidth of the line in pixels.
ColorColor to draw the line with. This is a UInt32 representation of an RGB value.

◆ DrawLineEx()

void AxMap.DrawLineEx ( int  LayerHandle,
double  x1,
double  y1,
double  x2,
double  y2,
int  pixelWidth,
uint  Color 
)

Draws a line on the specified drawing layer.

Parameters
LayerHandleThe handle of the drawing layer created with AxMap.NewDrawing call.
x1X coordinate of the first point used to draw the line
y1Y coordinate of the first point used to draw the line.
x2X coordinate of the second point used to draw the line.
y2Y coordinate of the second point used to draw the line.
pixelWidthWidth of the line in pixels.
ColorColor to draw the line with. This is a UInt32 representation of an RGB value.

◆ DrawPoint()

void AxMap.DrawPoint ( double  x,
double  y,
int  pixelSize,
uint  Color 
)

Draws a point on the last drawing layer created by AxMap.NewDrawing.

Parameters
xThe x coordinate of the point to draw
yThe y coordinate of the point to draw.
pixelSizeThe size in pixels of the point to be drawn.
ColorThe color of the point to be drawn. This is a UInt32 representation of an RGB color.

◆ DrawPointEx()

void AxMap.DrawPointEx ( int  LayerHandle,
double  x,
double  y,
int  pixelSize,
uint  Color 
)

Draws a point on the specified drawing layer.

Parameters
LayerHandleThe handle of the drawing layer created with AxMap.NewDrawing call.
xThe x coordinate of the point to draw
yThe y coordinate of the point to draw.
pixelSizeThe size in pixels of the point to be drawn.
ColorThe color of the point to be drawn. This is a UInt32 representation of an RGB color.
Examples:
ShapefileToDrawingLayer.cs, and SplitByAttribute.cs.

◆ DrawPolygon()

void AxMap.DrawPolygon ( ref object  xPoints,
ref object  yPoints,
int  numPoints,
uint  Color,
bool  fill 
)

Draws a polygon on the last drawing layer created using AxMap.NewDrawing.

Parameters
xPointsAn array containing x-coordinates for each point in the polygon.
yPointsAn array containing y-coordinates for each point in the polygon.
numPointsThe number of points in the polygon.
ColorThe color to use when drawing the polygon. This is a UInt32 representation of an RGB color.
fillA boolean value representing whether the polygon is drawn with a fill or not.

◆ DrawPolygonEx()

void AxMap.DrawPolygonEx ( int  LayerHandle,
ref object  xPoints,
ref object  yPoints,
int  numPoints,
uint  Color,
bool  fill 
)

Draws a polygon on the specified drawing layer.

Parameters
LayerHandleThe handle of the drawing layer created with AxMap.NewDrawing call.
xPointsAn array containing x-coordinates for each point in the polygon.
yPointsAn array containing y-coordinates for each point in the polygon.
numPointsThe number of points in the polygon.
ColorThe color to use when drawing the polygon. This is a UInt32 representation of an RGB color.
fillA boolean value representing whether the polygon is drawn with a fill or not.
Examples:
ShapefileToDrawingLayer.cs, and SplitByAttribute.cs.

◆ DrawWideCircle()

void AxMap.DrawWideCircle ( double  x,
double  y,
double  pixelRadius,
uint  Color,
bool  fill,
short  Width 
)

Draws a circle with custom outline width on the last drawing layer created by AxMap.NewDrawing.

Parameters
xCenter x coordinate for the circle to be drawn.
yCenter y coordinate for the circle to be drawn.
pixelRadiusRadius in pixels of the circle to be drawn.
ColorColor of the circle to be drawn. This is a UInt32 representation of an RGB color.
fillBoolean value which determines whether the circle will be drawn with a fill or not.
WidthThe width of the outline.

◆ DrawWideCircleEx()

void AxMap.DrawWideCircleEx ( int  LayerHandle,
double  x,
double  y,
double  radius,
uint  Color,
bool  fill,
short  OutlineWidth 
)

Draws a circle with custom outline width on the specified drawing layer.

Parameters
LayerHandleThe handle of the drawing layer created with AxMap.NewDrawing call.
xCenter x coordinate for the circle to be drawn.
yCenter y coordinate for the circle to be drawn.
radiusRadius in pixels of the circle to be drawn.
ColorColor of the circle to be drawn. This is a UInt32 representation of an RGB color.
fillBoolean value which determines whether the circle will be drawn with a fill or not.
OutlineWidthThe width of the outline.

◆ DrawWidePolygon()

void AxMap.DrawWidePolygon ( ref object  xPoints,
ref object  yPoints,
int  numPoints,
uint  Color,
bool  fill,
short  Width 
)

Draws a polygon with custom width of outline on the last drawing layer created using AxMap.NewDrawing.

Parameters
xPointsAn array containing x-coordinates for each point in the polygon.
yPointsAn array containing y-coordinates for each point in the polygon.
numPointsThe number of points in the polygon.
ColorThe color to use when drawing the polygon. This is a UInt32 representation of an RGB color.
fillA boolean value representing whether the polygon is drawn with a fill or not.
WidthThe width of the outline.

◆ DrawWidePolygonEx()

void AxMap.DrawWidePolygonEx ( int  LayerHandle,
ref object  xPoints,
ref object  yPoints,
int  numPoints,
uint  Color,
bool  fill,
short  OutlineWidth 
)

Draws a polygon with custom width of outline on the last drawing layer created using AxMap.NewDrawing.

Parameters
LayerHandleThe handle of the drawing layer created with AxMap.NewDrawing call.
xPointsAn array containing x-coordinates for each point in the polygon.
yPointsAn array containing y-coordinates for each point in the polygon.
numPointsThe number of points in the polygon.
ColorThe color to use when drawing the polygon. This is a UInt32 representation of an RGB color.
fillA boolean value representing whether the polygon is drawn with a fill or not.
OutlineWidthThe width of the outline.

◆ get_DrawingKey()

string AxMap.get_DrawingKey ( int  DrawHandle)

Gets the drawing key which may be used by the programmer to store any string for a drawing layer with specified handle.

Parameters
DrawHandleThe handle of the drawing layer.
Returns
The string associated with the layer.

◆ get_DrawingLabels()

Labels AxMap.get_DrawingLabels ( int  DrawingLayerIndex)

Gets labels associated with the drawing layer.

Parameters
DrawingLayerIndexThe handle of the drawing layer returned by AxMap.NewDrawing method.
Returns
The reference to the Labels class or NULL reference on the invalid handle.
Examples:
SplitByAttribute.cs, and ToolTip.cs.

◆ get_DrawingLabelsVisible()

bool AxMap.get_DrawingLabelsVisible ( int  DrawHandle)

Gets a boolean value which indicates whether labels of the drawing layer are visible.

This property corresponds to the Labels.Visible property.

Parameters
DrawHandleThe handle of the drawing layer returned by AxMap.NewDrawing method.
Returns
True in case labels are visible and false otherwise.

◆ NewDrawing()

int AxMap.NewDrawing ( tkDrawReferenceList  projection)

Creates a new drawing layer on the map returning its handle.

Parameters
projectionSets the coordinate system to use for the new drawing layer to be created. (tkDrawReferenceList.dlScreenReferencedList uses pixels in screen coordinates. tkDrawReferenceList.dlSpatiallyReferencedList uses projected map units.)
Returns
The handle for the new drawing layer in the map.
Examples:
ShapefileToDrawingLayer.cs, SplitByAttribute.cs, ToolTip.cs, and Tracking.cs.

◆ set_DrawingKey()

void AxMap.set_DrawingKey ( int  DrawHandle,
string  newValue 
)

Sets the drawing key may be used by the programmer to store any string for a drawing layer with specified handle.

Parameters
DrawHandleThe handle of the drawing layer.
newValueThe string associated with the layer.

◆ set_DrawingLabels()

void AxMap.set_DrawingLabels ( int  DrawingLayerIndex,
Labels  newValue 
)

Replaces the labels associated with the drawing layer.

Parameters
DrawingLayerIndexThe handle of the drawing layer returned by AxMap.NewDrawing method.
newValueThe new instance of the Labels class to associate with the layer.

◆ set_DrawingLabelsVisible()

void AxMap.set_DrawingLabelsVisible ( int  DrawHandle,
bool  newValue 
)

Sets a boolean value which indicates whether labels of the drawing layer are visible.

This property corresponds to the Labels.Visible property.

Parameters
DrawHandleThe handle of the drawing layer returned by AxMap.NewDrawing method.
newValueTrue in case labels are visible and false otherwise.

◆ SetDrawingLayerVisible()

void AxMap.SetDrawingLayerVisible ( int  LayerHandle,
bool  Visible 
)

Sets the boolean value which indicates whether the labels of the drawing layer are visible.

Parameters
LayerHandleThe handle of the drawing layer.
VisibleA boolean value which indicates whether the labels are visible.