HERE iOS SDK Developer's Guide

NMAGeoPolyline

Class Summary

class NMAGeoPolyline

Derived from: NSObject

Object representing a Polyline geometry, which consists of two or more points.

Include: NMAKit.framework/headers/NMAGeoPolyline.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAGeoPolyline

[For complete information, see the section Class Details]

Instance Method Summary

Table 1. Instance Methods
Instance Method Summary

-(void) addPoint:(nonnull NMAGeoCoordinates *) coordinate

Add a new point to the polyline

-(void) addPoints:(nonnull NSArray< NMAGeoCoordinates * > *) coordinates

Adds a list of points to the polyline

-(void) clear

-(nonnull NSArray< NMAGeoCoordinates * > *) getAllPoints

Get an NSArray with all points of the polyline

-(double) getLength

-(nullable NMAGeoCoordinates *) getNearestCoordinateFrom:(nonnull NMAGeoCoordinates *) coordinate

Gets the NMAGeoCoordinates (point) along the path of the polyline that is closest to the specified point

-(NSUInteger) getNearestIndexFromCoordinate:(nonnull NMAGeoCoordinates *) coordinate

Gets the point index along the path of the polyline that is closest to the specified point

-(int) getNumberOfPoints

-(nullable NMAGeoCoordinates *) getPointAtIndex:(int) index

Get the point from the specified index of this polyline

-(nonnull) init

Initialize an NMAGeoPolyline instance

-(nonnull) initWithCoordinates:(nonnull NSArray< NMAGeoCoordinates * > *) coordinates

Initializes an NMAGeoPolyline instance with the specified NMAGeoCoordinates

-(void) insertPoint:(nonnull NMAGeoCoordinates *) coordinate atIndex:(int) index

-(void) removePointAtIndex:(int) index

Class Details

Object representing a Polyline geometry, which consists of two or more points. This class can be used to manipulate a polyline geometry along with NMAMapPolyline for map rendering.

Instance Method Details

-(void) addPoint:(nonnull NMAGeoCoordinates *) coordinate

Add a new point to the polyline.

Parameters:

  • coordinate

    point to be added given as NMAGeoCoordinates

-(void) addPoints:(nonnull NSArray< NMAGeoCoordinates * > *) coordinates

Adds a list of points to the polyline.

Parameters:

  • coordinates

    NSArray containing the list of NMAGeoCoordinates

-(void) clear

Remove all points from the polyline

-(nonnull NSArray< NMAGeoCoordinates * > *) getAllPoints

Get an NSArray with all points of the polyline.

-(double) getLength

Return the geographical length of the polyline

-(nullable NMAGeoCoordinates *) getNearestCoordinateFrom:(nonnull NMAGeoCoordinates *) coordinate

Gets the NMAGeoCoordinates (point) along the path of the polyline that is closest to the specified point.

Parameters:

  • coordinate

    the origin point to search from given in NMAGeoCoordinates.

-(NSUInteger) getNearestIndexFromCoordinate:(nonnull NMAGeoCoordinates *) coordinate

Gets the point index along the path of the polyline that is closest to the specified point.

Parameters:

  • coordinate

    the origin point to search from given in NMAGeoCoordinates.

-(int) getNumberOfPoints

Get the total number of points that currently exists in the polyline

-(nullable NMAGeoCoordinates *) getPointAtIndex:(int) index

Parameters:

  • index

    position of the point along the polyline

Returns:

The NMAGeoCoordinates instance, or nil if failed

-(nonnull) init

Initialize an NMAGeoPolyline instance.

-(nonnull) initWithCoordinates:(nonnull NSArray< NMAGeoCoordinates * > *) coordinates

Initializes an NMAGeoPolyline instance with the specified NMAGeoCoordinates.

Parameters:

  • coordinates

    An NSArray containing two or more NMAGeoCoordinates.

Returns:

The NMAGeoPolyline instance, or nil if initialization failed

-(void) insertPoint:(nonnull NMAGeoCoordinates *) coordinate atIndex:(int) index

Insert a point to the polyline at the specified index

Parameters:

  • coordinate

    point to be added given as NMAGeoCoordinates

  • index

    position of the point along the polyline

-(void) removePointAtIndex:(int) index

Remove a point from the polyline with the specified index

Parameters:

  • index

    position of the point along the polyline

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.