PolylineMapObject class abstract
A polyline object with adjustable segment colors. Supports outlines, dash, arrows, and hiding parts of the polyline efficiently.
- Implemented types
Constructors
Properties
- arcApproximationStep ↔ double
-
Defines step of arc approximation. Smaller values make polyline
smoother. Measured in degrees. Default: 12.
getter/setter pair
- dashLength ↔ double
-
Length of a dash in units. Default: 0 (dashing is turned off). Arrows
are ignored in dashed polylines.
getter/setter pair
- dashOffset ↔ double
-
Offset from the start of the polyline to the reference dash in units.
Default: 0.
getter/setter pair
- draggable ↔ bool
-
If true, the map object can be dragged by the user. Default: false.
getter/setter pairinherited
- gapLength ↔ double
-
Length of the gap between two dashes in units. Default: 0 (dashing is
turned off). Arrows are ignored in dashed polylines.
getter/setter pair
- geometry ↔ Polyline
-
The polyline's geometry. Should contain at least 2 points. Changing
geometry resets polyline color indices to 0.
getter/setter pair
- gradientLength ↔ double
-
Maximum length (in units) of the gradient from one color to another.
Default: 0.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- innerOutlineEnabled ↔ bool
-
Enables the inner outline if true (a dark border along the edge of
the outline). Default: false.
getter/setter pair
- outlineColor ↔ Color
-
The outline color. Default: hexademical RGBA code 0x00000000.
getter/setter pair
- outlineWidth ↔ double
-
Width of the outline in units. Default: 0.
getter/setter pair
- parent → BaseMapObjectCollection
-
Returns the collection of map objects that the current map object
belongs to.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- strokeWidth ↔ double
-
The stroke width in units. Default: 5. The size of a unit is equal to
the size of a pixel at the current zoom level when the camera
position's tilt is equal to 0 and the scale factor is equal to 1.
getter/setter pair
- turnRadius ↔ double
-
Maximum radius of a turn. Measured in units. Default: 10.
getter/setter pair
- userData ↔ Object?
-
getter/setter pairinherited
- visible ↔ bool
-
Manages visibility of the object on the map. Default: true.
getter/setter pairinherited
- zIndex ↔ double
-
Gets the z-index, which affects:
getter/setter pairinherited
Methods
-
addArrow(
PolylinePosition position, Color fillColor, {required double length}) → Arrow - Adds an arrow.
-
addTapListener(
MapObjectTapListener tapListener) → void -
Adds a tap listener to the object.
inherited
-
arrows(
) → List< Arrow> - Provides arrows.
-
getPaletteColor(
int colorIndex) → Color - Returns the palette color for the specified index.
-
getStrokeColor(
int segmentIndex) → int - Returns the palette index used by segment with the specified index.
-
hide(
Subpolyline subpolyline) → void - Hides the subpolyline, canceling any previous hides.
-
hideMultiple(
List< Subpolyline> subpolylines) → void - Hides multiple subpolylines, canceling any previous hides.
-
isValid(
) → bool -
Usable only in runWithBlockUi or listener handlers.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeTapListener(
MapObjectTapListener tapListener) → void -
Removes the tap listener from the object.
inherited
-
select(
Color selectionColor, Subpolyline subpolyline) → void - Highlights a subpolyline using the specified color.
-
setDragListener(
MapObjectDragListener? dragListener) → void -
Sets a drag listener for the object. Each object can only have one
drag listener.
inherited
-
setPaletteColor(
Color color, {required int colorIndex}) → void - Sets color in RGBA mode for colorIndex. If the color is not provided for some index, the default value 0x0066FFFF is used.
-
setStrokeColor(
Color color) → void - Sets the polyline color. Effectively sets a single-color palette and sets all segments' palette indices to 0.
-
setStrokeColors(
List< int> colors) → void - Sets indexes of colors in palette for line segments. All the weights are equal to 1.
-
setStrokeColorsWithWeights(
{required List< int> colors, required List<double> weights}) → void - Sets indexes of colors in palette for line segments. Weights are used for generalization of colors. By default, all segments use palette index 0.
-
setVisible(
Animation animation, {required bool visible, Callback? onFinished}) → void -
Manages visibility of the object.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited