Represents a polygon object on the location view.
More...
|
| bool | setPolygon (LocationPolygon polygon) |
| | Method is used to specify the source polygon of the object.
|
| |
| bool | setColor (Color color) |
| | Method is used to specify the color of the object.
|
| |
| bool | setOrder (int order) |
| | Method is used to specify the rendering order of the object.
|
| |
| bool | setOutlineColor (Color color) |
| | Method is used to specify the color of the polygon’s outline.
|
| |
| bool | setOutlineWidth (double width) |
| | Method is used to specify the width of the polygon’s outline.
|
| |
| bool | setOutlineAlpha (double alpha) |
| | Method is used to specify the opacity of the polygon’s outline.
|
| |
| bool | setOutlineOrder (int order) |
| | Method is used to specify the rendering order of the polygon’s outline.
|
| |
| bool | isValid () |
| |
| 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 | setTitleWithStyle (String title, TitleStyle style) |
| | Method is used to set the title and its style for the map object.
|
| |
| bool | setAlpha (double alpha) |
| | Method is used to set the opacity of the map object.
|
| |
Represents a polygon object on the location view.
Referenced from LocationWindow.
Definition at line 30 of file polygon_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:
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:
print("Circle object ID: $objectId");
◆ getType()
Gets the type of the map object.
- Returns
- The type of the map object MapObjectType.
Dart code snippet:
print("Circle object type: $objectTypeString");
◆ isValid()
| bool PolygonMapObject.isValid |
( |
| ) |
|
◆ 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:
print("Set circle alpha to 0.7: $alphaSuccess");
◆ setColor()
| bool PolygonMapObject.setColor |
( |
Color | color | ) |
|
Method is used to specify the color of the object.
- Parameters
-
- Returns
- true if success, false otherwise.
Dart code snippet:
print("Set polygon color to green with 70% opacity: $colorSuccess");
◆ 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};
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
-
| 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:
print("Set circle interactive to true: $interactiveSuccess");
◆ setOrder()
| bool PolygonMapObject.setOrder |
( |
int | order | ) |
|
Method is used to specify the rendering order of the object.
- Parameters
-
| order | The rendering order value. Default: 0. |
- Returns
- true if success, false otherwise.
Dart code snippet:
print("Set polygon rendering order to 2: $orderSuccess");
◆ setOutlineAlpha()
| bool PolygonMapObject.setOutlineAlpha |
( |
double | alpha | ) |
|
Method is used to specify the opacity of the polygon’s outline.
- Parameters
-
| alpha | Opacity 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:
print("Set polygon outline alpha to 0.8: $outlineAlphaSuccess");
◆ setOutlineColor()
| bool PolygonMapObject.setOutlineColor |
( |
Color | color | ) |
|
Method is used to specify the color of the polygon’s outline.
- Parameters
-
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
bool outlineColorSuccess =
_polygonMapObject!.setOutlineColor(
const Color(0xFF0000FF));
print("Set polygon outline color to blue: $outlineColorSuccess");
◆ setOutlineOrder()
| bool PolygonMapObject.setOutlineOrder |
( |
int | order | ) |
|
Method is used to specify the rendering order of the polygon’s outline.
- Parameters
-
| order | The rendering order value. Default: 0. |
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
print("Set polygon outline order to 1: $outlineOrderSuccess");
◆ setOutlineWidth()
| bool PolygonMapObject.setOutlineWidth |
( |
double | width | ) |
|
Method is used to specify the width of the polygon’s outline.
- Parameters
-
| width | Width of the outline in pixels. |
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
print("Set polygon outline width to 2.0 pixels: $outlineWidthSuccess");
◆ setPolygon()
Method is used to specify the source polygon of the object.
- Parameters
-
- Returns
- true if success, false otherwise.
Dart code snippet:
List<GlobalPoint> points = [
GlobalPoint(100.0, 200.0),
GlobalPoint(150.0, 250.0),
GlobalPoint(200.0, 200.0),
GlobalPoint(150.0, 150.0),
];
LocationPolygon polygon = LocationPolygon(points, 0);
print("Set polygon with ${points.length} points: $success");
◆ 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:
print("Set circle title to 'Circle Object': $titleSuccess");
◆ setTitleWithStyle()
| bool MapObject.setTitleWithStyle |
( |
String | title, |
|
|
TitleStyle | style ) |
|
inherited |
Method is used to set the title and its style for the map object.
- Parameters
-
| title | The title to display on the location view. |
| style | Title style parameters TitleStyle. |
- Returns
- true if the operation is successful, false otherwise.
Dart code snippet:
bool titleStyleSuccess =
print("Set circle title with style: $titleStyleSuccess");
◆ 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:
print("Set circle visibility to true: $visibleSuccess");
The documentation for this class was generated from the following file: