Skip to content

Class NCLineMapObject

Il Kadyrov edited this page Nov 11, 2020 · 1 revision

NCLineMapObject class is used for showing line objects on the map.

Referenced from: NCLocationView.

Public methods

Function setPoints

- (void)setPoints:(nonnull NSArray<NCPoint *> *)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

- (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

- (float)getWidth;

Function returns the width of line object.

Return value

Width of the line map object.

Function setData

- (void)setData:(nonnull NSData *)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

- (nonnull NSData *)getData;

Function returns the data attached to the line object.

Return value

Byte array of data.

Function setEnabled

- (void)setEnabled:(BOOL)visibility;

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

Function setColor

- (void)setColor:(float)red
           green:(float)green
            blue:(float)blue
           alpha:(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