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, byte alpha=255)
 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, byte alpha=255)
 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, byte alpha=255)
 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, byte alpha=255)
 Draws a line on the specified drawing layer. More...
 
void AxMap.DrawPoint (double x, double y, int pixelSize, uint color, byte alpha=255)
 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, byte alpha=255)
 Draws a point on the specified drawing layer. More...
 
void AxMap.DrawPolygon (ref object xPoints, ref object yPoints, int numPoints, uint color, bool fill, byte alpha=255)
 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, byte alpha=255)
 Draws a polygon on the specified drawing layer. More...
 
void AxMap.DrawWideCircle (double x, double y, double pixelRadius, uint color, bool fill, short width, byte alpha=255)
 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, byte alpha=255)
 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, byte alpha=255)
 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, byte alpha=255)
 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_4.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,
byte  alpha = 255 
)

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.
alphaByte value which determines the alpha channel of the color.

◆ DrawCircleEx()

void AxMap.DrawCircleEx ( int  layerHandle,
double  x,
double  y,
double  pixelRadius,
uint  color,
bool  fill,
byte  alpha = 255 
)

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.
alphaByte value which determines the alpha channel of the color.
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,
byte  alpha = 255 
)

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.
alphaByte value which determines the alpha channel of the color.

◆ DrawLineEx()

void AxMap.DrawLineEx ( int  layerHandle,
double  x1,
double  y1,
double  x2,
double  y2,
int  pixelWidth,
uint  color,
byte  alpha = 255 
)

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.
alphaByte value which determines the alpha channel of the color.

◆ DrawPoint()

void AxMap.DrawPoint ( double  x,
double  y,
int  pixelSize,
uint  color,
byte  alpha = 255 
)

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.
alphaByte value which determines the alpha channel of the color.

◆ DrawPointEx()

void AxMap.DrawPointEx ( int  layerHandle,
double  x,
double  y,
int  pixelSize,
uint  color,
byte  alpha = 255 
)

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.
alphaByte value which determines the alpha channel of the color.
Examples
ShapefileToDrawingLayer.cs, and SplitByAttribute.cs.

◆ DrawPolygon()

void AxMap.DrawPolygon ( ref object  xPoints,
ref object  yPoints,
int  numPoints,
uint  color,
bool  fill,
byte  alpha = 255 
)

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.
alphaByte value which determines the alpha channel of the color.

◆ DrawPolygonEx()

void AxMap.DrawPolygonEx ( int  layerHandle,
ref object  xPoints,
ref object  yPoints,
int  numPoints,
uint  color,
bool  fill,
byte  alpha = 255 
)

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.
alphaByte value which determines the alpha channel of the color.
Examples
ShapefileToDrawingLayer.cs, and SplitByAttribute.cs.

◆ DrawWideCircle()

void AxMap.DrawWideCircle ( double  x,
double  y,
double  pixelRadius,
uint  color,
bool  fill,
short  width,
byte  alpha = 255 
)

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.
alphaByte value which determines the alpha channel of the color.

///

◆ DrawWideCircleEx()

void AxMap.DrawWideCircleEx ( int  layerHandle,
double  x,
double  y,
double  radius,
uint  color,
bool  fill,
short  outlineWidth,
byte  alpha = 255 
)

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.
alphaByte value which determines the alpha channel of the color.

◆ DrawWidePolygon()

void AxMap.DrawWidePolygon ( ref object  xPoints,
ref object  yPoints,
int  numPoints,
uint  color,
bool  fill,
short  width,
byte  alpha = 255 
)

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.
alphaByte value which determines the alpha channel of the color.

◆ DrawWidePolygonEx()

void AxMap.DrawWidePolygonEx ( int  layerHandle,
ref object  xPoints,
ref object  yPoints,
int  numPoints,
uint  color,
bool  fill,
short  outlineWidth,
byte  alpha = 255 
)

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.
alphaByte value which determines the alpha channel of the color.

◆ 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.