# Polyline

Since: BlackBerry 10.2.0

#include <bb/platform/geo/Polyline>

To link against this class, add the following line to your .pro file: LIBS += -lbbcascadesmaps

A Polyline in geographic space that is represented by an ordered set of latitude and longitude coordinates (vertices).

Note: Invalid coordinates are ignored when it comes to adding new coordinates.

## Overview

### Public Functions Index

Polyline () | |

Polyline (const Polyline &src) | |

Polyline (const QList< Coordinate > &points) | |

~Polyline () | |

void | append (const Coordinate &vertex) |

void | append (const QList< Coordinate > &vertices) |

Coordinate | at (int index) const |

BoundingBox | boundingBox () const |

void | clear () |

int | count () const |

void | insertAt (const Coordinate &vertex, int index) |

bool | isEmpty () const |

bool | operator!= (const Polyline &other) const |

Polyline & | operator= (const Polyline &src) |

bool | operator== (const Polyline &other) const |

void | removeAt (int index) |

void | replace (int index, const Coordinate &point) |

int | size () const |

## Public Functions

Copy constructor.

Parameters | |
---|---|

src |
The source of the copy information. |

BlackBerry 10.2.0

Given a list of Coordinates, creates a Polyline instance.

Parameters | |
---|---|

points |
The list of Coordinates (vertices) used to compose the Polyline. Invalid coordinates are ignored. |

BlackBerry 10.2.0

Destructor.

BlackBerry 10.2.0

### void

Appends the vertex to this Polyline.

Parameters | |
---|---|

vertex |
The coordinate to the appended. An invalid coordinate is ignored. |

BlackBerry 10.2.0

### void

Appends the list of given vertices to this object.

Parameters | |
---|---|

vertices |
The list of coordinates to be appended. Invalid coordinates are ignored. |

BlackBerry 10.2.0

### Coordinate

Returns the Coordinate (vertex) at index position.

Index must be a valid index position (i.e., 0 <= index < size()).

Parameters | |
---|---|

index |
The position of the desired coordinate. |

The desired coordinate. If the index is out of bounds, then an invalid Coordinate is returned.

BlackBerry 10.2.0

### void

Removes all Coordinates (vertices).

BlackBerry 10.2.0

### void

Inserts point at index position.

Parameters | |
---|---|

vertex |
The vertex to be inserted. An invalid coordinate is ignored. |

index |
The position for the vertex to be added. If index is 0, the value is prepended to the Polyline. If index is size(), the value is appended to the Polyline. If the index is outside the accepted range, then the operation is ignored. |

BlackBerry 10.2.0

### bool

Determines if there are any vertices in this Polyline.

true if the size is zero.

BlackBerry 10.2.0

### bool

Inequality operator.

Parameters | |
---|---|

other |
The Polyline to compare. |

true if there is any difference in value or order between this object and the parameter.

BlackBerry 10.2.0

### Polyline &

Assignment operator.

Parameters | |
---|---|

src |
The source of the assignment. |

BlackBerry 10.2.0

### bool

Equality operator.

Parameters | |
---|---|

other |
The Polyline to compare. |

true if all the coordinates of the two lines are equal in value and order.

BlackBerry 10.2.0

### void

Removes the vertex at the position index.

Parameters | |
---|---|

index |
The position index. index must be a valid index position (i.e., 0 <= index < size()). If the index is outside the accepted range, then the operation is ignored. |

BlackBerry 10.2.0

### void

Replaces the vertex at the position index.

Parameters | |
---|---|

index |
The position index. index must be a valid index position (i.e., 0 <= index < size()). If the index is outside the accepted range, then the operation is ignored. |

point |
The new Coordinate to replace the point at index. If point is an invalid coordinate, it is ignored. |

BlackBerry 10.2.0