Represents an icon object on the location view.
More...
|
| bool | setPosition (LocationPoint point) |
| | Method is used to specify the center of the icon.
|
| |
| bool | setPositionAnimated (LocationPoint point, double duration, AnimationType type) |
| | Method is used to move the center of the icon with the specified animation.
|
| |
| bool | setBitmap (ImageWrapper bitmap) |
| | Method is used to specify the bitmap image for the icon.
|
| |
| bool | setSize (double width, double height) |
| | Method is used to specify the size of the icon.
|
| |
| bool | setCollisionEnabled (bool enabled) |
| | Method is used to enable or disable collision detection for the icon.
|
| |
| bool | setAngle (double angle) |
| | Method is used to specify the rotation angle of the icon.
|
| |
| bool | setAngleAnimated (double angle, double duration, AnimationType type) |
| | Method is used to rotate the icon with the specified animation.
|
| |
| bool | setBuffer (double width, double height) |
| | Method is used to specify the buffer size around the icon 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 icon.
|
| |
| bool | setFlat (bool flat) |
| | Method is used to specify whether the icon is flat or billboarded.
|
| |
| 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.
|
| |
Represents an icon object on the location view.
Referenced from LocationWindow.
- Note
- IconMapObject maintains orientation to the screen surface by default.
Definition at line 28 of file icon_map_object.dart.
◆ 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:
Map<String, dynamic> retrievedData = _circleMapObject!.data;
print("Circle custom data: $retrievedData");
◆ getId()
Gets the unique identifier of the map object.
- Returns
- The unique identifier of the map object.
Dart code snippet:
int objectId = _circleMapObject!.id;
print("Circle object ID: $objectId");
◆ getType()
Gets the type of the map object.
- Returns
- The type of the map object MapObjectType.
Dart code snippet:
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
-
| alpha | Opacity 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:
bool alphaSuccess = _circleMapObject!.setAlpha(0.7);
print("Set circle alpha to 0.7: $alphaSuccess");
◆ setAngle()
| bool IconMapObject.setAngle |
( |
double | angle | ) |
|
Method is used to specify the rotation angle of the icon.
- Parameters
-
| angle | Rotation angle in degrees. Default: 0. |
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
bool angleSuccess = _iconMapObject!.setAngle(45.0);
print("Set icon rotation angle to 45 degrees: $angleSuccess");
◆ setAngleAnimated()
| bool IconMapObject.setAngleAnimated |
( |
double | angle, |
|
|
double | duration, |
|
|
AnimationType | type ) |
Method is used to rotate the icon with the specified animation.
- Parameters
-
| angle | Rotation angle in degrees. |
| duration | Animation duration in seconds. |
| type | Animation type AnimationType. |
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
bool angleAnimatedSuccess = _iconMapObject!.setAngleAnimated(
90.0,
2.0,
AnimationType.SINE,
);
print(
"Set icon rotation with animation to 90 degrees: $angleAnimatedSuccess",
);
◆ setBitmap()
| bool IconMapObject.setBitmap |
( |
ImageWrapper | bitmap | ) |
|
Method is used to specify the bitmap image for the icon.
- Parameters
-
| bitmap | Platform bitmap object. |
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
bool bitmapSuccess = _iconMapObject!.setBitmap("path/to/bitmap.png");
print("Set icon bitmap: $bitmapSuccess");
◆ setBuffer()
| bool IconMapObject.setBuffer |
( |
double | width, |
|
|
double | height ) |
Method is used to specify the buffer size around the icon for collision detection.
- Parameters
-
| width | Width of the buffer in pixels. Default: 0. |
| height | Height of the buffer in pixels. Default: 0. |
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
bool bufferSuccess = _iconMapObject!.setBuffer(10.0, 10.0);
print("Set collision buffer to 10x10 pixels: $bufferSuccess");
◆ setCollisionEnabled()
| bool IconMapObject.setCollisionEnabled |
( |
bool | enabled | ) |
|
Method is used to enable or disable collision detection for the icon.
- Parameters
-
| enabled | Specifies whether collision detection is enabled (true) or disabled (false). Default: false. |
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
bool collisionSuccess = _iconMapObject!.setCollisionEnabled(true);
print("Enabled collision detection for icon: $collisionSuccess");
◆ setData()
| void MapObject.setData |
( |
Uint8List | data | ) |
|
|
inherited |
Method is used to set user-defined data for the map object.
- Parameters
-
| data | Data to store in the map object. |
Dart code snippet:
Map<String, dynamic> customData = {"key": "value", "number": 42};
bool dataSuccess = _circleMapObject!.setData(customData);
print("Set circle custom data: $dataSuccess");
◆ setFlat()
| bool IconMapObject.setFlat |
( |
bool | flat | ) |
|
Method is used to specify whether the icon is flat or billboarded.
- Parameters
-
| flat | If true, the icon aligns with the location view surface; if false, it maintains orientation to the screen surface. Default: false. |
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
bool flatSuccess = _iconMapObject!.setFlat(true);
print("Set icon flat mode to true: $flatSuccess");
◆ setInteractive()
| bool MapObject.setInteractive |
( |
bool | interactive | ) |
|
|
inherited |
Method is used to specify whether the map object can be interacted with.
- Parameters
-
| interactive | Specifies 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:
bool interactiveSuccess = _circleMapObject!.setInteractive(true);
print("Set circle interactive to true: $interactiveSuccess");
◆ setOffset()
| bool IconMapObject.setOffset |
( |
double | width, |
|
|
double | height ) |
Method is used to specify an offset for the circle’s position.
- Parameters
-
| width | Horizontal offset in pixels. |
| height | Vertical offset in pixels. |
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
bool offsetSuccess = _iconMapObject!.setOffset(0.0, -16.0);
print("Set position offset to (0.0, -16.0) pixels: $offsetSuccess");
◆ setPosition()
Method is used to specify the center of the icon.
- Parameters
-
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
LocationPoint iconPoint = LocationPoint(200.0, 300.0);
bool success = _iconMapObject!.setPosition(iconPoint);
print("Set icon position to (${iconPoint.x}, ${iconPoint.y}): $success");
◆ setPositionAnimated()
Method is used to move the center of the icon with the specified animation.
- Parameters
-
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
LocationPoint animatedIconPoint = LocationPoint(250.0, 350.0);
bool animatedSuccess = _iconMapObject!.setPositionAnimated(
animatedIconPoint,
1.5,
AnimationType.CUBIC,
);
print(
"Set icon position with animation to (${animatedIconPoint.x}, ${animatedIconPoint.y}): $animatedSuccess",
);
◆ setPriority()
| bool IconMapObject.setPriority |
( |
double | priority | ) |
|
Method is used to specify the priority of the icon.
- Parameters
-
| priority | The priority value for rendering or interaction. Default: max. |
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
bool prioritySuccess = _iconMapObject!.setPriority(2);
print("Set rendering priority to 2: $prioritySuccess");
◆ setSize()
| bool IconMapObject.setSize |
( |
double | width, |
|
|
double | height ) |
Method is used to specify the size of the icon.
- Parameters
-
| width | Width of the icon in pixels. |
| height | Height of the icon in pixels. |
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
bool sizeSuccess = _iconMapObject!.setSize(32.0, 32.0);
print("Set icon size to 32x32 pixels: $sizeSuccess");
◆ setTitle()
| bool MapObject.setTitle |
( |
String | title | ) |
|
|
inherited |
Method is used to set the title of the map object.
- Parameters
-
| title | The title to display on the location view. |
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
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
-
| visible | Specifies whether the object is visible (true) or hidden (false). Default: true. |
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
bool visibleSuccess = _circleMapObject!.setVisible(true);
print("Set circle visibility to true: $visibleSuccess");
The documentation for this class was generated from the following file: