Class: Toybox.WatchUi.MapPolyline

Overview

An object representing a polyline (polygonal chain) on the map.

This object holds an Array of Location objects to draw a polyline on the map.

See Also:

Since:

API Level 3.0.0

Supported Devices:

Instance Method Summary collapse

Instance Method Details

addLocation(location as Position.Location or Lang.Array<Position.Location>) as Void

Add a Location or Locations to the MapPolyline object location Array.

Parameters:

Since:

API Level 3.0.0

clear() as Void

Clear all the Location objects from the MapPolyline object's location Array.

Since:

API Level 3.0.0

getLocation(index as Lang.Number) as Position.Location or Null

Get the Location object at a provided index in this MapPolyline object.

Parameters:

  • index(Lang.Number)

    The index of the requested Location

Returns:

Since:

API Level 3.0.0

numLocations() as Lang.Number

Get the number of Location objects in this MapPolyline object.

Returns:

  • Lang.Number

    The number of Location objects in this MapPolyline object.

Since:

API Level 3.0.0

setColor(color as Graphics.ColorType) as Void

Set the color of the MapPolyline to draw on the map.

Parameters:

Since:

API Level 3.0.0

setWidth(width as Lang.Number) as Void

Set the width of the MapPolyline to draw on the map.

Parameters:

  • width(Lang.Number)

    The width of the line in pixels (px)

Since:

API Level 3.0.0


Generated Apr 17, 2024 9:40:39 AM