MapTrip SDK Android Manual 9.9.7
PoiSearch Class Reference

The PoiSearch enables to search for Points of interest around a location or along a route
More...

Static Public Member Functions

static void addPoiSearchListener (PoiSearchListener listener)
 
static void addTaskListener (TaskListener listener)
 
static void removeAllPoiSearchListeners ()
 
static void removeAllTaskListeners ()
 
static void removePoiSearchListener (PoiSearchListener listener)
 
static void removeTaskListener (TaskListener listener)
 
static Task< Iterable< Waypoint > > searchPoisAlongRoute (final int maxDistFromRouteInMeters, final List< PoiCategory > poicategories, final String nameFilter, final double length)
 
static Task< Iterable< Waypoint > > searchPoisAroundPoint (final Position pos, final int radiusInMeters, final List< PoiCategory > poicategories, final String nameFilter)
 
static ApiError startNotifier (final int maxDistInMeters, final List< PoiCategory > poicategories, final String nameFilter)
 
static ApiError stopNotifier ()
 

Detailed Description

A point of interest, or POI, is a specific point location that someone may find useful or interesting. Many POIs ae already defined in the mapdata
A GPS point of interest specifies, at minimum, the latitude and longitude of the POI, assuming a certain map datum.
A name or description for the POI is usually included, and other information such as altitude or a telephone number may also be attached. Icons are used to display POI categories graphically.

All poi search functions processes asynchronous and return a Task object. The PoiSearch class provides a set of callbacks to retrieve the progress ( TaskListener.taskProgress() ) and finished ( TaskListener.taskFinished() ) events of the poi search task. The result ( Task.getResult() ) of a poi search task is an iterator of waypoints. Only one poi search task can be processed at one time.

Member Function Documentation

◆ addPoiSearchListener()

static void addPoiSearchListener ( PoiSearchListener  listener)
static

◆ addTaskListener()

static void addTaskListener ( TaskListener  listener)
static

◆ removeAllPoiSearchListeners()

static void removeAllPoiSearchListeners ( )
static

◆ removeAllTaskListeners()

static void removeAllTaskListeners ( )
static

◆ removePoiSearchListener()

static void removePoiSearchListener ( PoiSearchListener  listener)
static

◆ removeTaskListener()

static void removeTaskListener ( TaskListener  listener)
static

◆ searchPoisAlongRoute()

static Task< Iterable< Waypoint > > searchPoisAlongRoute ( final int  maxDistFromRouteInMeters,
final List< PoiCategory poicategories,
final String  nameFilter,
final double  length 
)
static

Starts a poi search along the current route. Please remember that only one poi search task can be processed at one time. If this method is called while another poi search operation is still running, the BaseTask.getReturnValue() of the task is ApiError.TOO_MANY_TASKS.

Parameters
maxDistFromRouteInMeters- maximal distance for a poi from the route
poicategories- array of POI categories, defining which pois categories are searched
nameFilter- additional filter for the name: This string must be a part of the name of the found pois (case insensitive)
length- Maximal length in meters to search from current position towards destination
Returns
Task object. The result of the task Task.getResult() is an iterator of waypoints containing the identified POI's.

◆ searchPoisAroundPoint()

static Task< Iterable< Waypoint > > searchPoisAroundPoint ( final Position  pos,
final int  radiusInMeters,
final List< PoiCategory poicategories,
final String  nameFilter 
)
static

Starts a poi search around a given position. Please remember that only one poi search task can be processed at one time. If this method is called while another poi search operation is still running, the BaseTask.getReturnValue() of the task is ApiError.TOO_MANY_TASKS. The search results are sorted by distance

Parameters
pos- coordinates of the point to search around
poicategories- array of POI categories, defining which pois categories are searched
radiusInMeters- radius around point to search
nameFilter- additional filter for the name: This string must be a part of the name of the found pois (case insensitive)
Returns
Task object. The result of the task Task.getResult() is an iterator of waypoints containing the identified POI's.

◆ startNotifier()

static ApiError startNotifier ( final int  maxDistInMeters,
final List< PoiCategory poicategories,
final String  nameFilter 
)
static

Starts the poi notifier along the current route or just in driving direction, if there is just no route available. The poi notification callback function PoiSearchListener.poiNotificationReceived() must be set and will be called as soon as a poi of the given category in in maxDistInMeters to the current pos.

Parameters
maxDistInMeters- Maximal distance to a poi, when you get notifying callbacks
poicategories- Array of POI categories, defining which pois categories are searched
nameFilter- Additional filter for the name: This string must be a part of the name of the found pois (case insensitive)
Returns
Errorcode:

◆ stopNotifier()

static ApiError stopNotifier ( )
static

Stops the poi notifier.

Returns
Errorcode

The documentation for this class was generated from the following file: