Skip to content

Class PolylineMapObject

PavelTychinin edited this page Oct 29, 2021 · 2 revisions

PolylineMapObject class is used for showing polyline objects on the map.

Referenced from: LocationView.

Public methods

Function setPoints

public void setPoints(ArrayList<Point> points)

Function sets the points for poly line object on the map. Points should be in metric coordinates. (For simple line just pass the start and end coordinates).

Parameters
  • points — array of x and y metric coordinates for your poly line object.

Function setWidth

public void setWidth(float width)

Function sets the width of line object.

Parameters
  • width — width of the line object, should be evaluated considering the fact that location view's width is from -1 to 1.

Function getWidth

public float getWidth()

Function returns the width of line object.

Return value

Width of the line map object.

Function setData

public void setData(byte[] data)

Function sets the data for line map object which could be used for distinguishing different objects on map.

Parameters
  • data — byte array of data.

Function getData

public byte[] getData()

Function returns the data attached to the line object.

Return value

Byte array of data.

Function setEnabled

public void setEnabled(boolean visibility)

Function is used for setting the visibility of line object on the map.

Function setColor

public void setColor(float red, float green, float blue, float alpha)

Function is used for setting the color of map object.

Parameters
  • red — red color in range 0..1.
  • green — green color in range 0..1.
  • blue — blue color in range 0..1.
  • alpha — alpha color in range 0..1.

Clone this wiki locally