LineString

Last Updated On 2021-07-16

Version 2MinSDK 7Tutorial Video

LineString


Properties

You can set the below properties in the UI part of the builder.

  • Description - it's a text value which is set to blank by default.
  • Draggable - it's a boolean value which is set to false by default.
  • EnableInfobox - it's a boolean value which is set to false by default.
  • PointsFromString - it's a textArea value which is set to blank by default.
  • StrokeColor - it's a color value which is set to &hff000000 by default.
  • StrokeOpacity - it's a float value which is set to 1.0 by default.
  • StrokeWidth - it's a text value which is set to 3 by default.
  • Title - it's a text value which is set to blank by default.
  • Visible - it's a visibility value which is set to true by default.

Block Properties

You can set the below blocks properties in the blocks section of the builder.

Description

The description displayed in the info window that appears when the user clicks on the LineString.


Draggable

The Draggable property is used to set whether or not the user can drag the LineString by long-pressing and then dragging the LineString to a new location.


EnableInfobox

Enable or disable the infobox window display when the user taps the LineString.


Points

The list of points, as pairs of latitudes and longitudes, in the `LineString`.


PointsFromString

Set the points of the LineString from a specially-coded character string of the form: [[latitude1, longitude1], [latitude2, longitude2], ...]


StrokeColor

The paint color used to outline the LineString.


StrokeOpacity

The opacity of the stroke used to outline the map feature.


StrokeWidth

Sets or gets the width of the stroke used to outline the `LineString`.


Title

The title displayed in the info window that appears when the user clicks on the LineString.


Type

Returns the type of the map feature. For LineString, this returns MapFeature.LineString ("LineString").


Visible

Specifies whether the LineString should be visible on the screen. Value is true if the component is showing and false if hidden.



Methods

You can set the below method blocks in the blocks section of the builder.

DistanceToFeature

Compute the distance, in meters, between two map features.

DistanceToPoint

Compute the distance, in meters, between a LineString and a latitude, longitude point.

HideInfobox

Hide the infobox if it is shown. If the infobox is not visible this function has no effect.

ShowInfobox

Show the infobox for the LineString. This will show the infobox even if EnableInfobox is set to false.


Events

You can set the below event blocks in the blocks section of the builder.

Click

The user clicked on the LineString.

Drag

The user dragged the LineString.

LongClick

The user long-pressed on the LineString. This event will only trigger if Draggable is false.

StartDrag

The user started a drag operation.

StopDrag

The user stopped a drag operation.