Loading...
Searching...
No Matches
CircleMapObject Class Referenceabstract

Represents a circle on the location view. More...

+ Inheritance diagram for CircleMapObject:

Public Member Functions

bool setPosition (LocationPoint point)
 Method is used to specify the center of the circle.
 
bool setPositionAnimated (LocationPoint point, double duration, AnimationType type)
 Method is used to move the center of the circle with the specified animation.
 
bool setColor (double red, double green, double blue, double alpha)
 Method is used to specify the fill color of the circle.
 
bool setRadius (double radius)
 Method is used to specify the size of the circle.
 
bool setCollisionEnabled (bool enabled)
 Method is used to enable or disable collision detection for the circle.
 
bool setBuffer (double width, double height)
 Method is used to specify the buffer size around the circle for collision detection.
 
bool setOffset (double width, double height)
 Method is used to specify an offset for the circle’s position.
 
bool setPriority (double priority)
 Method is used to specify the priority of the circle.
 
bool setOutlineColor (double red, double green, double blue, double alpha)
 Method is used to specify the color of the circle’s outline.
 
bool setOutlineRadius (double radius)
 Method is used to specify the thickness of the circle’s outline.
 
bool setOutlineAlpha (double alpha)
 Method is used to specify the opacity of the circle’s outline.
 
int getId ()
 Gets the unique identifier of the map object.
 
MapObjectType getType ()
 Gets the type of the map object.
 
Uint8List getData ()
 Gets the user-defined data associated with the map object.
 
bool setVisible (bool visible)
 Method is used to specify the visibility of the map object.
 
bool setInteractive (bool interactive)
 Method is used to specify whether the map object can be interacted with.
 
void setData (Uint8List data)
 Method is used to set user-defined data for the map object.
 
bool setTitle (String title)
 Method is used to set the title of the map object.
 
bool setAlpha (double alpha)
 Method is used to set the opacity of the map object.
 

Detailed Description

Represents a circle on the location view.

Referenced from LocationWindow.

Definition at line 25 of file circle_map_object.dart.

Member Function Documentation

◆ getData()

Uint8List MapObject.getData ( )
inherited

Gets the user-defined data associated with the map object.

Returns
The data stored in the map object.

Dart code snippet:

// Get custom data
Map<String, dynamic> retrievedData = _circleMapObject!.data;
print("Circle custom data: $retrievedData");

◆ getId()

int MapObject.getId ( )
inherited

Gets the unique identifier of the map object.

Returns
The unique identifier of the map object.

Dart code snippet:

// Get object ID
int objectId = _circleMapObject!.id;
print("Circle object ID: $objectId");

◆ getType()

MapObjectType MapObject.getType ( )
inherited

Gets the type of the map object.

Returns
The type of the map object MapObjectType.

Dart code snippet:

// Get object type
String objectTypeString = _circleMapObject!.type;
print("Circle object type: $objectTypeString");

◆ setAlpha()

bool MapObject.setAlpha ( double alpha)
inherited

Method is used to set the opacity of the map object.

Parameters
alphaOpacity multiplier. Values below 0 will be set to 0. Values above 1 will be set to 1. Default: 1.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set alpha transparency
bool alphaSuccess = _circleMapObject!.setAlpha(0.7);
print("Set circle alpha to 0.7: $alphaSuccess");

◆ setBuffer()

bool CircleMapObject.setBuffer ( double width,
double height )

Method is used to specify the buffer size around the circle for collision detection.

Parameters
widthWidth of the buffer in pixels. Default: 0.
heightHeight of the buffer in pixels. Default: 0.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set collision buffer
bool bufferSuccess = _circleMapObject!.setBuffer(5.0, 5.0);
print("Set collision buffer to 5x5 pixels: $bufferSuccess");

◆ setCollisionEnabled()

bool CircleMapObject.setCollisionEnabled ( bool enabled)

Method is used to enable or disable collision detection for the circle.

Parameters
enabledSpecifies whether collision detection is enabled (true) or disabled (false). Default: false.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Enable collision detection
bool collisionSuccess = _circleMapObject!.setCollisionEnabled(true);
print("Enabled collision detection for circle: $collisionSuccess");

◆ setColor()

bool CircleMapObject.setColor ( double red,
double green,
double blue,
double alpha )

Method is used to specify the fill color of the circle.

Parameters
redRed RGBA component (0 to 1).
greenGreen RGBA component (0 to 1).
blueBlue RGBA component (0 to 1).
alphaOpacity multiplier (0 to 1). Values below 0 are set to 0. Default: 1.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set circle color
bool colorSuccess = _circleMapObject!.setColor(1.0, 0.0, 0.0, 0.8);
print("Set circle color to red with 80% opacity: $colorSuccess");

◆ setData()

void MapObject.setData ( Uint8List data)
inherited

Method is used to set user-defined data for the map object.

Parameters
dataData to store in the map object.

Dart code snippet:

// Set custom data
Map<String, dynamic> customData = {"key": "value", "number": 42};
bool dataSuccess = _circleMapObject!.setData(customData);
print("Set circle custom data: $dataSuccess");

◆ setInteractive()

bool MapObject.setInteractive ( bool interactive)
inherited

Method is used to specify whether the map object can be interacted with.

Parameters
interactiveSpecifies whether the object can be picked in the pickMapObjectAt method (true) or not (false). Default: false.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set interactive mode
bool interactiveSuccess = _circleMapObject!.setInteractive(true);
print("Set circle interactive to true: $interactiveSuccess");

◆ setOffset()

bool CircleMapObject.setOffset ( double width,
double height )

Method is used to specify an offset for the circle’s position.

Parameters
widthHorizontal offset in pixels.
heightVertical offset in pixels.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set position offset
bool offsetSuccess = _circleMapObject!.setOffset(2.0, 3.0);
print("Set position offset to (2.0, 3.0) pixels: $offsetSuccess");

◆ setOutlineAlpha()

bool CircleMapObject.setOutlineAlpha ( double alpha)

Method is used to specify the opacity of the circle’s outline.

Parameters
alphaOpacity multiplier (0 to 1). Values below 0 are set to 0. Default: 1.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set outline alpha
bool outlineAlphaSuccess = _circleMapObject!.setOutlineAlpha(0.5);
print("Set circle outline alpha to 0.5: $outlineAlphaSuccess");

◆ setOutlineColor()

bool CircleMapObject.setOutlineColor ( double red,
double green,
double blue,
double alpha )

Method is used to specify the color of the circle’s outline.

Parameters
redRed RGBA component (0 to 1).
greenGreen RGBA component (0 to 1).
blueBlue RGBA component (0 to 1).
alphaOpacity multiplier (0 to 1). Values below 0 are set to 0. Default: 1.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set outline color
bool outlineColorSuccess = _circleMapObject!.setOutlineColor(
0.0,
0.0,
1.0,
1.0,
);
print("Set circle outline color to blue: $outlineColorSuccess");

◆ setOutlineRadius()

bool CircleMapObject.setOutlineRadius ( double radius)

Method is used to specify the thickness of the circle’s outline.

Parameters
radiusThickness of the outline in pixels.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set outline radius
bool outlineRadiusSuccess = _circleMapObject!.setOutlineRadius(2.0);
print("Set circle outline radius to 2.0: $outlineRadiusSuccess");

◆ setPosition()

bool CircleMapObject.setPosition ( LocationPoint point)

Method is used to specify the center of the circle.

Parameters
pointMetrics coordinates of the center LocationPoint.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set circle position
LocationPoint centerPoint = LocationPoint(100.0, 200.0);
bool success = _circleMapObject!.setPosition(centerPoint);
print(
"Set circle position to (${centerPoint.x}, ${centerPoint.y}): $success",
);

◆ setPositionAnimated()

bool CircleMapObject.setPositionAnimated ( LocationPoint point,
double duration,
AnimationType type )

Method is used to move the center of the circle with the specified animation.

Parameters
pointMetrics coordinates of the center LocationPoint.
durationAnimation duration in seconds.
typeAnimation type AnimationType. Default: CENTER.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set circle position with animation
LocationPoint animatedPoint = LocationPoint(150.0, 250.0);
bool animatedSuccess = _circleMapObject!.setPositionAnimated(
animatedPoint,
2.0,
AnimationType.LINEAR,
);
print(
"Set circle position with animation to (${animatedPoint.x}, ${animatedPoint.y}): $animatedSuccess",
);

◆ setPriority()

bool CircleMapObject.setPriority ( double priority)

Method is used to specify the priority of the circle.

Parameters
priorityThe priority value for rendering or interaction. Default: 0.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set rendering priority
bool prioritySuccess = _circleMapObject!.setPriority(1);
print("Set rendering priority to 1: $prioritySuccess");

◆ setRadius()

bool CircleMapObject.setRadius ( double radius)

Method is used to specify the size of the circle.

Parameters
radiusRadius of the circle in meters.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set circle radius
bool radiusSuccess = _circleMapObject!.setRadius(10.0);
print("Set circle radius to 10.0 meters: $radiusSuccess");

◆ setTitle()

bool MapObject.setTitle ( String title)
inherited

Method is used to set the title of the map object.

Parameters
titleThe title to display on the location view.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set title
bool titleSuccess = _circleMapObject!.setTitle("Circle Object");
print("Set circle title to 'Circle Object': $titleSuccess");

◆ setVisible()

bool MapObject.setVisible ( bool visible)
inherited

Method is used to specify the visibility of the map object.

Parameters
visibleSpecifies whether the object is visible (true) or hidden (false). Default: true.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set visibility
bool visibleSuccess = _circleMapObject!.setVisible(true);
print("Set circle visibility to true: $visibleSuccess");

The documentation for this class was generated from the following file: