THIS SDK ISDEPRECATED.

We rolled out a new and better SDK for you.

Search along the route

Allow your users to search for POIs (Points of Interest) along a planned route so they can optimally add places to their rides. This search is constrained by specifying the detour time and limiting the number of results. The minimum number of route points is 2.

Sample use case 1: You are driving from Amsterdam to Haarlem and you would like to find a gas station or an EV station to fuel or charge your car during your drive.

Sample use case 2: When planning your next trip, you would like to add a car repair station so you can fix and safely drive your vehicle.

Use the following code to try this in your app:

1AlongRouteSearchQueryBuilder query = new AlongRouteSearchQueryBuilder(
2 term,
3 route.getCoordinates(),
4 SEARCH_MAX_DETOUR_TIME)
5
6query.withLimit(SEARCH_MAX_LIMIT);
7
8SearchApi searchAPI = OnlineSearchApi.create(context, BuildConfig.SEARCH_API_KEY);
9searchAPI.alongRouteSearch(query.build(), alongRouteSearchCallback);
1val query = AlongRouteSearchQueryBuilder(
2 term,
3 route.getCoordinates(),
4 SEARCH_MAX_DETOUR_TIME
5)
6 .withLimit(SEARCH_MAX_LIMIT)
7 .build()
searchApi.alongRouteSearch(query)

Sample views utilizing Search Along Route:

image

With term "PETROL_STATION"

image

With term "ELECTRIC_VEHICLE_STATION"