Loading...
Searching...
No Matches
PolylineMapObject Class Referenceabstract

Represents a polyline object on the location view. More...

+ Inheritance diagram for PolylineMapObject:

Public Member Functions

bool setPolyLine (LocationPolyline polyline)
 Method is used to specify the source polyline of the object.
 
bool setWidth (double width)
 Method is used to specify the width of the polyline.
 
bool setColor (double red, double green, double blue, double alpha)
 Method is used to specify the fill color of the polyline.
 
bool setOrder (int order)
 Method is used to specify the rendering order of the polyline.
 
bool setCapType (CapType cap)
 Method is used to specify the cap style for the polyline ends.
 
bool setJoinType (JoinType join)
 Method is used to specify the join style for polyline segments.
 
bool setMiterLimit (double miterLimit)
 Method is used to specify the miter limit for miter joins.
 
bool setOutlineColor (double red, double green, double blue, double alpha)
 Method is used to specify the color of the polyline’s outline.
 
bool setOutlineWidth (double radius)
 Method is used to specify the width of the polyline’s outline.
 
bool setOutlineAlpha (double alpha)
 Method is used to specify the opacity of the polyline’s outline.
 
bool setOutlineCapType (CapType cap)
 Method is used to specify the cap style for the polyline’s outline ends.
 
bool setOutlineJoinType (JoinType join)
 Method is used to specify the join style for the polyline’s outline segments.
 
bool setOutlineMiterLimit (double miterLimit)
 Method is used to specify the miter limit for the polyline’s outline miter joins.
 
bool setOutlineOrder (int order)
 Method is used to specify the rendering order of the polyline’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 polyline object on the location view.

Referenced from LocationWindow.

Definition at line 26 of file polyline_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");

◆ setCapType()

bool PolylineMapObject.setCapType ( CapType cap)

Method is used to specify the cap style for the polyline ends.

Parameters
capThe cap type CapType. Default: BUTT.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set cap type
bool capSuccess = _polylineMapObject!.setCapType(CapType.ROUND);
print("Set cap type to ROUND: $capSuccess");

◆ setColor()

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

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

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 polyline color
bool colorSuccess = _polylineMapObject!.setColor(1.0, 0.5, 0.0, 0.9);
print("Set polyline color to orange with 90% 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");

◆ setJoinType()

bool PolylineMapObject.setJoinType ( JoinType join)

Method is used to specify the join style for polyline segments.

Parameters
joinThe join type JoinType. Default: MITER.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set join type
bool joinSuccess = _polylineMapObject!.setJoinType(JoinType.ROUND);
print("Set join type to ROUND: $joinSuccess");

◆ setMiterLimit()

bool PolylineMapObject.setMiterLimit ( double miterLimit)

Method is used to specify the miter limit for miter joins.

Parameters
miterLimitThe miter limit value for miter joins. Default: 3.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set miter limit
bool miterSuccess = _polylineMapObject!.setMiterLimit(5.0);
print("Set miter limit to 5.0: $miterSuccess");

◆ setOrder()

bool PolylineMapObject.setOrder ( int order)

Method is used to specify the rendering order of the polyline.

Parameters
orderThe rendering order value. Default: 0.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set rendering order
bool orderSuccess = _polylineMapObject!.setOrder(2);
print("Set rendering order to 2: $orderSuccess");

◆ setOutlineAlpha()

bool PolylineMapObject.setOutlineAlpha ( double alpha)

Method is used to specify the opacity of the polyline’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 = _polylineMapObject!.setOutlineAlpha(0.8);
print("Set polyline outline alpha to 0.8: $outlineAlphaSuccess");

◆ setOutlineCapType()

bool PolylineMapObject.setOutlineCapType ( CapType cap)

Method is used to specify the cap style for the polyline’s outline ends.

Parameters
capThe cap type CapType. Default: BUTT.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set outline cap type
bool outlineCapSuccess = _polylineMapObject!.setOutlineCapType(
CapType.ROUND,
);
print("Set polyline outline cap type to ROUND: $outlineCapSuccess");

◆ setOutlineColor()

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

Method is used to specify the color of the polyline’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 = _polylineMapObject!.setOutlineColor(
0.0,
0.0,
0.0,
1.0,
);
print("Set polyline outline color to black: $outlineColorSuccess");

◆ setOutlineJoinType()

bool PolylineMapObject.setOutlineJoinType ( JoinType join)

Method is used to specify the join style for the polyline’s outline segments.

Parameters
joinThe join type JoinType. Default: MITER.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set outline join type
bool outlineJoinSuccess = _polylineMapObject!.setOutlineJoinType(
JoinType.ROUND,
);
print("Set polyline outline join type to ROUND: $outlineJoinSuccess");

◆ setOutlineMiterLimit()

bool PolylineMapObject.setOutlineMiterLimit ( double miterLimit)

Method is used to specify the miter limit for the polyline’s outline miter joins.

Parameters
miterLimitThe miter limit value for outline miter joins. Default: 3.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set outline miter limit
bool outlineMiterSuccess = _polylineMapObject!.setOutlineMiterLimit(3.0);
print("Set polyline outline miter limit to 3.0: $outlineMiterSuccess");

◆ setOutlineOrder()

bool PolylineMapObject.setOutlineOrder ( int order)

Method is used to specify the rendering order of the polyline’s outline.

Parameters
orderThe rendering order value for the outline. Default: 0.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set outline order
bool outlineOrderSuccess = _polylineMapObject!.setOutlineOrder(1);
print("Set polyline outline order to 1: $outlineOrderSuccess");

◆ setOutlineWidth()

bool PolylineMapObject.setOutlineWidth ( double radius)

Method is used to specify the width of the polyline’s outline.

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

Dart code snippet:

// Set outline width
bool outlineWidthSuccess = _polylineMapObject!.setOutlineWidth(1.0);
print("Set polyline outline width to 1.0: $outlineWidthSuccess");

◆ setPolyLine()

bool PolylineMapObject.setPolyLine ( LocationPolyline polyline)

Method is used to specify the source polyline of the object.

Parameters
polylineMetrics coordinates of the polyline LocationPolyline.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set polyline geometry
List<Point> polylinePoints = [
Point(0.0, 0.0),
Point(50.0, 50.0),
Point(100.0, 0.0),
Point(150.0, 50.0),
];
Polyline polyline = Polyline(polylinePoints);
LocationPolyline locationPolyline = LocationPolyline(polyline);
bool success = _polylineMapObject!.setPolyLine(locationPolyline);
print("Set polyline geometry: $success");

◆ 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");

◆ setWidth()

bool PolylineMapObject.setWidth ( double width)

Method is used to specify the width of the polyline.

Parameters
widthWidth of the polyline in pixels.
Returns
true if the operation is successful, false otherwise.

Dart code snippet:

// Set polyline width
bool widthSuccess = _polylineMapObject!.setWidth(3.0);
print("Set polyline width to 3.0 pixels: $widthSuccess");

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