Search code examples
ioscocoa-touchhere-apihere-maps-resthere-ios

Here Maps iOS SDK: Change the colour of sublegs in a route


I would like to know if it is possible to give different colors to different sub legs in a route using Here maps iOS SDK. I saw upcomingColor and traveledColor property in NMAMapRoute.h class but didn't see any documentation on how the traveled route and upcoming route are calculated. In my use case, I have to plot at least 3 colors to 3 different sub legs of my route. One thing I saw during my investigation is NMAMapPolyline class. Can I use this to draw a route between waypoints? Did it cause any performance issues?.

I will appreciate if someone can provide insight into these. Thank you


Solution

  • With color property, you can change the color of the whole route (not parts) drawn on the map.

    With the traveledColor property, you can change the color of the part of the route you have travelled so far (so from you start waypoint to the current location on the route).

    With the upcomingColor property, you can change the color of the next waypoint to the final destination.

    Apart from these, the SDK does not support changing random parts of the route out of the box.