NTRoutingRequest


@interface NTRoutingRequest : NSObject {
  void *swigCPtr;
  BOOL swigCMemOwn;
}

A class that defines required attributes for routing (end points, etc).

  • Checks if this object is equal to the specified object.

    Declaration

    Objective-C

    - (BOOL)isEqual:(id)object;

    Parameters

    object

    The reference object.

    Return Value

    True when objects are equal, false otherwise.

  • Returns the hash value of this object.

    Declaration

    Objective-C

    - (NSUInteger)hash;

    Return Value

    The hash value of this object.

  • Constructs a new RoutingRequest instance from projection and via points.

    Declaration

    Objective-C

    - (id)initWithProjection:(NTProjection *)projection
                      points:(NTMapPosVector *)points;

    Parameters

    projection

    The projection of the points.

    points

    The list of points that the route must pass. Must contains at least 2 elements.

  • Returns the projection of the points in the request.

    Declaration

    Objective-C

    - (NTProjection *)getProjection;

    Return Value

    The projection of the request.

  • Returns the point list of the request.

    Declaration

    Objective-C

    - (NTMapPosVector *)getPoints;

    Return Value

    The point list of the request.

  • Returns the parameter value for the given routing point.

    Declaration

    Objective-C

    - (NTVariant *)getPointParameter:(int)index param:(NSString *)param;

    Parameters

    index

    The routing point index.

    param

    The name of the parameter.

    Return Value

    The value of the specified parameter of the given routing point. If the parameter does not exist, empty variant is returned.

  • Sets the parameter value for the given routing point. This is currently supported by Valhalla routing engine and can be used to specify initial or final heading, for example. In addition to Valhalla, SGRE routing engine supports ‘geometry_tag_filter’ parameter for specifying how to filter matching edges.

    Declaration

    Objective-C

    - (void)setPointParameter:(int)index
                        param:(NSString *)param
                        value:(NTVariant *)value;

    Parameters

    index

    The routing point index.

    param

    The name of the parameter to set.

    value

    The new value for the parameter of the given routing point.

  • Returns the custom parameter value of the request.

    Declaration

    Objective-C

    - (NTVariant *)getCustomParameter:(NSString *)param;

    Parameters

    param

    The name of the parameter to return.

    Return Value

    The value of the parameter. If the parameter does not exist, empty variant is returned.

  • Sets a custom parameter value for the the request.

    Declaration

    Objective-C

    - (void)setCustomParameter:(NSString *)param value:(NTVariant *)value;

    Parameters

    param

    The name of the parameter. For example, “trace_options.search_radius”.

    value

    The new value for the parameter.

  • Creates a string representation of this request object, useful for logging.

    Declaration

    Objective-C

    - (NSString *)description;

    Return Value

    The string representation of this request object.

  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;