Skip to content

Instantly share code, notes, and snippets.

Avatar

here-devblog-gists

  • HERE Technologies
View GitHub Profile
View pedRouting-6.java
...
searchRequest.addReference("yelp");
...
View pedRouting-5.java
...
m_mapRoute = new MapRoute(routeResults.get(0).getRoute());
/* Show the maneuver number on top of the route */
m_mapRoute.setManeuverNumberVisible(true);
...
View pedRouting-4.java
...
coreRouter.calculateRoute(routePlan,
new Router.Listener<List<RouteResult>, RoutingError>() {
@Override
public void onProgress(int i) {
/* The calculation progress can be retrieved in this callback. */
}
...
View pedRouting-3.java
...
/* 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) {
View pedRouting-2.java
...
/* Calculate the shortest route available. */
routeOptions.setRouteType(RouteOptions.Type.SHORTEST);
/* Calculate 1 route. */
routeOptions.setRouteCount(1);
/* Finally set the route option */
routePlan.setRouteOptions(routeOptions);
...
View pedRouting-1.java
...
routeOptions.setTransportMode(RouteOptions.TransportMode.PEDESTRIAN);
...
View searchPubs-4.java
...
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;
View searchPubs-3.java
...
searchRequest.execute(discoveryResultPageListener);
...
View searchPubs-2.java
...
searchRequest.setCollectionSize(5);
searchRequest.setSearchArea(currentLocation,5000);
...
View searchPubs-1.java
...
SearchRequest searchRequest = new SearchRequest("Pub");
...
You can’t perform that action at this time.