Skip to content

Instantly share code, notes, and snippets.

View here-devblog-gists's full-sized avatar

here-devblog-gists

  • HERE Technologies
View GitHub Profile
...
searchRequest.addReference("yelp");
...
...
m_mapRoute = new MapRoute(routeResults.get(0).getRoute());
/* Show the maneuver number on top of the route */
m_mapRoute.setManeuverNumberVisible(true);
...
...
coreRouter.calculateRoute(routePlan,
new Router.Listener<List<RouteResult>, RoutingError>() {
@Override
public void onProgress(int i) {
/* The calculation progress can be retrieved in this callback. */
}
...
...
/* Define Waypoints for the route
* The first one being current location
* Select the rest from the ResultList
* */
routePlan.addWaypoint(new RouteWaypoint(currentLocation));
for (DiscoveryResult item : s_ResultList) {
...
/* Calculate the shortest route available. */
routeOptions.setRouteType(RouteOptions.Type.SHORTEST);
/* Calculate 1 route. */
routeOptions.setRouteCount(1);
/* Finally set the route option */
routePlan.setRouteOptions(routeOptions);
...
...
routeOptions.setTransportMode(RouteOptions.TransportMode.PEDESTRIAN);
...
...
s_ResultList = discoveryResultPage.getItems();
for (DiscoveryResult item : s_ResultList) {
/*
* Add a marker for each result of PlaceLink type.
*/
if (item.getResultType() == DiscoveryResult.ResultType.PLACE) {
PlaceLink placeLink = (PlaceLink) item;
...
searchRequest.execute(discoveryResultPageListener);
...
...
searchRequest.setCollectionSize(5);
searchRequest.setSearchArea(currentLocation,5000);
...
...
SearchRequest searchRequest = new SearchRequest("Pub");
...