The QLandmarkProximityFilter class is used to search for landmarks based on the radius around a given coordinate. More...
#include <QLandmarkProximityFilter>
Inherits QLandmarkFilter.
enum | Selection { SelectAll, SelectNearestOnly } |
QLandmarkProximityFilter ( const QGeoCoordinate & coordinate = QGeoCoordinate(), double radius = -1 ) | |
QLandmarkProximityFilter ( const QLandmarkFilter & other ) | |
virtual | ~QLandmarkProximityFilter () |
QGeoCoordinate | coordinate () const |
double | radius () const |
Selection | selection () const |
void | setCoordinate ( const QGeoCoordinate & coordinate ) |
void | setRadius ( double radius ) |
void | setSelection ( Selection selection ) |
The QLandmarkProximityFilter class is used to search for landmarks based on the radius around a given coordinate.
In order to be a valid filter, the region covered by the proximity filter must not cover one of the poles. The landmarks are returned in ascending order of distance. A proximity filter may be used inside an intersection filter to sort landmarks by distance in combination with other criteria such as categories.
Defines the selection behavior of the proximity filter.
Constant | Value | Description |
---|---|---|
QLandmarkProximityFilter::SelectAll | 1 | Selects all landmarks in the given proximity |
QLandmarkProximityFilter::SelectNearestOnly | 0 | Selects only the closest landmark |
Creates a filter that will select landmarks within a given radius around a central coordinate.
Constructs a copy of other if possible, otherwise constructs a new proximity filter.
Destroys the filter.
Returns the central coordinate of the filter.
See also setCoordinate().
Returns the radius of the filter. the unit of the radius is meters.
See also setRadius().
Returns the selection type of the proximity filter. By default the proximity filter will be SelectAll to select all landmarks with a given proximity.
See also setSelection().
Sets the central coordinate of the filter.
See also coordinate().
Sets the radius of the filter. The unit of the radius is meters.
See also radius().
Sets the selection type of the proximity filter.
See also selection().