This example demonstrates how to search for points of interest (POIs) along a pre-calculated route. When the app starts it computes a route, then slides in a search panel showing a bar of POI categories. Tapping a category searches for that type of place along the route, and each result lists its name, description, distance and the side of the route it is on. Tapping a result highlights it on the map.
Once the worldwide road map is ready, the demo sets up the map touch handler, loads the POI categories and calculates the route. The route runs between two fixed waypoints (Folkestone → Paris) and is computed with RoutingService.calculateRoute.
When the routing service completes, the first route is kept as mainRoute and the search panel is shown. showSearchPanel() resizes the map to share the screen with the panel and then calls presentRoute on the next layout pass, so the route is framed using the map's final (half-screen) dimensions.
The category chips in the search panel are built from the SDK's generic POI categories. Each CategoryItem keeps the category name, icon and id; the list is then submitted to the horizontal categoriesView adapter.
Tapping a category chip calls searchAlongRouteForCategory. The selected category id is mapped to an EGenericCategoriesIDs value, any in-flight search is cancelled, the maximum number of matches is capped, and the search is launched with SearchService.searchAlongRoute(mainRoute, category). Tapping the already-selected chip again deselects it and clears the result list.
The SearchService reports progress through its onStarted / onCompleted callbacks. On completion the returned landmarks are mapped to displayable ResultItems and submitted to the list; a "no results" message is shown when the search returns nothing.
Each result carries extra information produced by the along-route search. buildResultItems reads gm_search_result_dist to obtain the distance along the route and gm_search_result_side to decide whether the POI is on the left or right of the route, choosing the matching side icon.
When the user taps a result row, highlightLandmarkOnMap clears any previous highlight, assigns the SDK's built-in search-result pin as the landmark image, and brings the landmark into view. POIs that have a geographic contour (parks, buildings, etc.) are centred on that area with centerOnRectArea and their contour is drawn; point POIs are centred on their coordinate with centerOnCoordinates. The landmark is then highlighted with activateHighlightLandmarks.