UOMap ActiveX Control
Download:
UOMap Control and
documentation
Example Applications:
For Visual Basic
For Visual C++
Properties
DrawStatics (type BOOL) - Toggle for whether to draw static objects or
not. (default - FALSE)
xCenter (type short) - The horizontal center position of the map, from 0 at the
left to 6144 at the right. (default - 3072)
yCenter (type short) - The vertical center position of the map, from 0 at the
top to 4096 at the bottom. (default - 2048)
ZoomLevel (type short) - The current zoom level of the map, from -4 at max zoom
out to 8 at max zoom in. (default - 0)
Methods
GetCenter(short *x, short *y)
- Retrieves the center x and y position of the map.
Scroll(short direction, short distance)
- Scrolls the map in the direction specified by the specified distance in map units.
The direction value is one of the following:
0 = North
1 = NorthEast
2 = East
3 = SouthEast
4 = South
5 = SouthWest
6 = West
7 = NorthWest
SetCenter(short x, short y)
- Sets the center of the map to the specified position.
ZoomIn() - Increments
the ZoomLevel property by 1.
ZoomOut() -
Decrements the ZoomLevel property by 1.
CtrlToMap(short *x, short *y)
- Converts a point from control pixel coordinates to map coordinates.
short CtrlToMapX(short x)
- Converts the x coordinate of a point from pixel coordinates to map coordinates.
short CtrlToMapY(short y)
- Converts the y coordinate of a point from pixel coordinates to map coordinates.
MapToCtrl(short *x, short *y)
- Converts a point from map coordinates to control pixel coordinates.
short MapToCtrlX(short x)
- Converts the x coordinate of a point from map coordinates to control pixel coordinates.
short MapToCtrlX(short y)
- Converts the y coordinate of a point from map coordinates to control pixel coordinates.
short GetMapHeight(short x, short y)
- Determines the map altitude for the map location x, y
long AddDrawObject(short x, short y, short type, short size, long color)
- Adds a draw object to an internal storage array in the control. Returns the
array index of the inserted object, or -1 if unable to add the object. The
x and y values represent the map coordinates of the object. The type value
is one of the following:
0 = No object
1 = Cross (plus sign)
2 = Square
3 = Diamond
4 = Dot
5 = Circle
6 = Triangle
The size value is the number of pixels for the radius of the object. The
color value is a standard RGB value, where the four bytes are denoted (in hex)
by 0x00bbggrr, with bb being the blue value, gg being the green value, and rr
being the red value.
boolean RemoveDrawObject(short x, short y, short type, short size, long color)
- Removes a draw object from internal storage that matches the provided
parameters. Returns true if successful, or false if no match could be
found.
boolean RemoveDrawObjectAt(long index)
- Removes a draw object from internal storage at the given index. Returns
true if successful, or false if there was no object at the supplied index.
boolean RemoveDrawObjects()
- Removes all draw objects from internal storage. Returns true if
successful, or false if an error occurred.
long AddDrawRect(short xleft, short ytop, short width, short height, short mode,
long color)
- Adds a drawing rectangle to an internal storage array in the control.
Returns the index of the inserted object, or -1 if unable to add the
rectangle. The x and y values represent the map coordinates of the
object. The width and height represent the width and height (in map
coordinates) of the rectangle. The mode value is one of the following:
0 = Fill solid
1 = Fill blend
2 = Outline
The color value is a standard RGB value, where the four bytes are denoted (in
hex) by 0x00bbggrr, with bb being the blue value, gg being the green value, and
rr being the red value.
boolean RemoveDrawRect(short x, short y, short width, short height, short mode,
long color)
- Removes a drawing rectangle from internal storage that matches the
provided parameters. Returns true if successful, or false if no match
could be found.
boolean RemoteDrawRectAt(long index)
- Removes a drawing rectangle from internal
storage at the given index. Returns true if successful, or false if there
was no object at the supplied index.
boolean RemoveDrawRects()
- Removes all drawing rectangles from internal storage. Returns true if successful, or false if an error occurred.