Interface PolylineMapObject
- All Superinterfaces:
- Summary
- Methods
- getGeometry
- setGeometry
- getStyle
- setStyle
- getStrokeWidth
- setStrokeWidth
- getGradientLength
- setGradientLength
- getOutlineColor
- setOutlineColor
- getOutlineWidth
- setOutlineWidth
- isInnerOutlineEnabled
- setInnerOutlineEnabled
- getTurnRadius
- setTurnRadius
- getArcApproximationStep
- setArcApproximationStep
- getDashLength
- setDashLength
- getGapLength
- setGapLength
- getDashOffset
- setDashOffset
- select
- hide
- hide
- setStrokeColors
- setStrokeColors
- setPaletteColor
- getPaletteColor
- setStrokeColor
- getStrokeColor
- addArrow
- arrows
Package world.mappable.mapkit.map
All Superinterfaces:
interface PolylineMapObject extends MapObject
A polyline object with adjustable segment colors.
Supports outlines, dash, arrows, and hiding parts of the polyline efficiently.
Summary
Methods
|
Type and modifiers |
Method and Description |
|
getGeometry() |
|
|
void |
setGeometry(@NonNull Polyline geometry) |
|
getStyle() |
|
|
void |
|
|
float |
|
|
void |
setStrokeWidth(float strokeWidth) |
|
float |
|
|
void |
setGradientLength(float gradientLength) |
|
int |
|
|
void |
setOutlineColor(int outlineColor) |
|
float |
|
|
void |
setOutlineWidth(float outlineWidth) |
|
boolean |
|
|
void |
setInnerOutlineEnabled(boolean innerOutlineEnabled) |
|
float |
|
|
void |
setTurnRadius(float turnRadius) |
|
float |
|
|
void |
setArcApproximationStep(float arcApproximationStep) |
|
float |
|
|
void |
setDashLength(float dashLength) |
|
float |
|
|
void |
setGapLength(float gapLength) |
|
float |
|
|
void |
setDashOffset(float dashOffset) |
|
void |
select(int selectionColor, |
|
void |
hide(@NonNull Subpolyline subpolyline) |
|
void |
hide(@NonNull java.util.List<Subpolyline> subpolylines) |
|
void |
setStrokeColors(@NonNull java.util.List<java.lang.Integer> colors, |
|
void |
setStrokeColors(@NonNull java.util.List<java.lang.Integer> colors) |
|
void |
setPaletteColor(int colorIndex, |
|
int |
getPaletteColor(int colorIndex) |
|
void |
setStrokeColor(int color) |
|
int |
getStrokeColor(int segmentIndex) |
|
addArrow(@NonNull PolylinePosition position, |
|
|
java.util.List<Arrow> |
arrows() |
Methods
getGeometry
|
@NonNull |
The polyline's geometry.
Should contain at least 2 points. Changing geometry resets polyline color indices to 0.
setGeometry
|
void setGeometry(@NonNull Polyline geometry) |
getStyle
|
@NonNull |
The polyline's style.
setStyle
|
void setStyle(@NonNull LineStyle style) |
getStrokeWidth
|
@Deprecated |
Alert
Use LineStyle for actions with properties. 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.
setStrokeWidth
|
@Deprecated |
getGradientLength
|
@Deprecated |
Alert
Use LineStyle for actions with properties. Maximum length (in units) of the gradient from one color to another. Default: 0.
setGradientLength
|
@Deprecated |
getOutlineColor
|
@Deprecated |
Alert
Use LineStyle for actions with properties. The outline color. Default: hexademical RGBA code 0x00000000.
setOutlineColor
|
@Deprecated |
getOutlineWidth
|
@Deprecated |
Alert
Use LineStyle for actions with properties. Width of the outline in units. Default: 0.
setOutlineWidth
|
@Deprecated |
isInnerOutlineEnabled
|
@Deprecated |
Alert
Use LineStyle for actions with properties. Enables the inner outline if true (a dark border along the edge of the outline). Default: false.
setInnerOutlineEnabled
|
@Deprecated |
getTurnRadius
|
@Deprecated |
Alert
Use LineStyle for actions with properties. Maximum radius of a turn. Measured in units. Default: 10.
setTurnRadius
|
@Deprecated |
getArcApproximationStep
|
@Deprecated |
Alert
Use LineStyle for actions with properties. Defines step of arc approximation. Smaller values make polyline smoother. Measured in degrees. Default: 12.
setArcApproximationStep
|
@Deprecated |
getDashLength
|
@Deprecated |
Alert
Use LineStyle for actions with properties. Length of a dash in units. Default: 0 (dashing is turned off). Arrows are ignored in dashed polylines.
setDashLength
|
@Deprecated |
getGapLength
|
@Deprecated |
Alert
Use LineStyle for actions with properties. Length of the gap between two dashes in units. Default: 0 (dashing is turned off). Arrows are ignored in dashed polylines.
setGapLength
|
@Deprecated |
getDashOffset
|
@Deprecated |
Alert
Use LineStyle for actions with properties. Offset from the start of the polyline to the reference dash in units. Default: 0.
setDashOffset
|
@Deprecated |
select
|
void select(int selectionColor, |
Highlights a subpolyline using the specified color.
hide
|
void hide(@NonNull Subpolyline subpolyline) |
Hides the subpolyline, canceling any previous hides.
hide
|
void hide(@NonNull java.util.List<Subpolyline> subpolylines) |
Hides multiple subpolylines, canceling any previous hides.
setStrokeColors
|
void setStrokeColors(@NonNull java.util.List<java.lang.Integer> colors, |
Sets indexes of colors in palette for line segments.
Weights are used for generalization of colors. By default, all segments use palette index 0.
setStrokeColors
|
void setStrokeColors(@NonNull java.util.List<java.lang.Integer> colors) |
Sets indexes of colors in palette for line segments.
All the weights are equal to 1.
setPaletteColor
|
void setPaletteColor(int colorIndex, |
Sets color in RGBA mode for colorIndex.
If the color is not provided for some index, the default value 0x0066FFFF is used.
getPaletteColor
|
int getPaletteColor(int colorIndex) |
Returns the palette color for the specified index.
setStrokeColor
|
void setStrokeColor(int color) |
Sets the polyline color.
Effectively sets a single-color palette and sets all segments' palette indices to 0.
getStrokeColor
|
int getStrokeColor(int segmentIndex) |
Returns the palette index used by segment with the specified index.
addArrow
|
@NonNull |
Adds an arrow.
|
Parameters |
|
|
|
Coordinates of the center of the arrow. |
|
|
Overall length of the arrow (including the tip) in units. |
|
|
Color of the arrow. Adding arrows disables dash for this polyline. |
arrows
|
@NonNull |
Provides arrows.