Skip to content

Line String

Category Requires Version
Maps API 21, Android 5.0 Lollipop 2

Overview

A visible component that draws a sequence of line segments on a Map component.

Events

Click

The user clicked on the feature.

whenLine String.Clickdo

Drag

The user dragged the map feature.

whenLine String.Dragdo

Long Click

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

whenLine String.Long Clickdo

Start Drag

The user started a drag operation.

whenLine String.Start Dragdo

Stop Drag

The user stopped a drag operation.

whenLine String.Stop Dragdo

Methods

Distance To Feature

Returns: Number

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

callLine String.Distance To Featuremap Featurecentroids
Params
map Feature Component
centroids Boolean

Distance To Point

Returns: Number

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

callLine String.Distance To Pointlatitudelongitudecentroid
Params
latitude Number
longitude Number
centroid Boolean

Hide Infobox

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

callLine String.Hide Infobox

Show Infobox

Show the infobox for the feature. This will show the infobox even if

callLine String.Show Infobox

Properties

Description

Text ➖ Read Write - Designer Blocks

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

Line String.Description
setLine String.Description to 

Draggable

Boolean Default: False ➖ Read Write - Designer Blocks

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

Line String.Draggable
setLine String.Draggable to 

Enable Infobox

Boolean Default: False ➖ Read Write - Designer Blocks

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

Line String.Enable Infobox
setLine String.Enable Infobox to 

Points

List ➖ Read Write - Blocks

A list of latitude and longitude pairs that represent the line segments of the polyline.

Line String.Points
setLine String.Points to 

Points From String

Text ➖ Write - Designer Blocks

Set the points of the LineString from a specially-coded character string of the form:[[longitude1, latitude1], [longitude2, latitude2], ...]Note the reversal of latitude and longitude versus how they are typically represented.

setLine String.Points From String to 

Stroke Color

Color Default: #000000FF  ➖ Read Write - Designer Blocks

The paint color used to outline the map feature.

Line String.Stroke Color
setLine String.Stroke Color to 

Stroke Opacity

Number Default: 1.0 ➖ Read Write - Designer Blocks

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

Line String.Stroke Opacity
setLine String.Stroke Opacity to 

Stroke Width

Number Default: 3 ➖ Read Write - Designer Blocks

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

Line String.Stroke Width
setLine String.Stroke Width to 

Title

Text ➖ Read Write - Designer Blocks

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

Line String.Title
setLine String.Title to 

Type

Text ➖ Read - Blocks

The type of the map feature.

Line String.Type

Visible

Boolean Default: True ➖ Read Write - Designer Blocks

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

Line String.Visible
setLine String.Visible to