noahd
noahd

Reputation: 862

HERE Maps: Change color of already travelled part of route

Is it possible to change the color of the route during navigation? Specifically I would like the already travelled parts of the route to be a different color then the upcoming parts of the route. Right now it is all the same color.

Upvotes: 2

Views: 1483

Answers (3)

rsd96
rsd96

Reputation: 1114

Setting the traveledColor variable of the MapRoute object to transparent did the trick for me.

mapRoute?.color = ResourcesCompat.getColor(resources, R.color.colorAccent, null)
mapRoute?.traveledColor = ResourcesCompat.getColor(resources, android.R.color.transparent, null)

Upvotes: 2

David Leong
David Leong

Reputation: 1762

This is currently not supported with the 3.3.x generation of the HERE SDK.

This feature is something we are trying to add in an upcoming release, so stay tuned!

Upvotes: 1

Andro
Andro

Reputation: 65

you need to use Polyline class to draw your path and then you can set color to it.

 Polyline line = googlemap.addPolyline(new PolylineOptions()
     .add(new LatLng (myLocation2.getLatitude(), myLocation2.getLongitude()), new LatLng (currentLocation.getLatitude(), currentLocation.getLongitude())).width(5)
     .color(Color.RED)); 

Upvotes: 1

Related Questions