Tuesday 3 August 2021

set zindex for map objects in here maps android

I am trying to setzindex of some map objects in here maps using android sdk. My problem is I have navigation route set and along those route I want to show truck restrictions. I tried changing setzindex of the maproute object but truck restrictions along the route is still hiding.

This is what my code snippet looks like.

@Override
public void onCalculateRouteFinished(@NonNull List<RouteResult> routeResults, @NonNull RoutingError routingError) {
  if (routingError == RoutingError.NONE) {
     if (routeResults.get(0).getRoute() != null) {
        route = routeResults.get(0).getRoute();
        mapRoute = new MapRoute(route);
        mapRoute.setZIndex(0);
        map.addMapObject(mapRoute);
                    
        map.setFleetFeaturesVisible(EnumSet.of(Map.FleetFeature.TRUCK_RESTRICTIONS)); //*not showing along route
                 .........          
       } 
    } 
 }

How can put truck restrictions above map route in android?



from set zindex for map objects in here maps android

No comments:

Post a Comment