mapbox-navigation-android icon indicating copy to clipboard operation
mapbox-navigation-android copied to clipboard

Ability to hide/change the origin waypoint icon

Open abhishek1508 opened this issue 3 years ago • 4 comments

I would like a way to hide .originWaypointIcon() after starting a trip, "origin is only origin the first time you start navigating". The current suggested workaround is to update the resource used for .originWaypointIcon() to have a transparent color.

/cc @mapbox/navigation-android @mapbox/navigation-ios

abhishek1508 avatar May 31 '22 21:05 abhishek1508

I'm not sure what the ask is here. The MapboxRouteLineView has a hideOriginAndDestinationPoints method. This will hide both origin and destination markers since they are on the same layer. Otherwise what's described above as the "workaround" will also do the job.

If the functionality needs to be expanded beyond the available options above then it's worth exploring the idea of creating a waypoint API as has been suggested previously.

cafesilencio avatar Aug 22 '22 17:08 cafesilencio

Can we separate hideOriginAndDestinationPoints into 2 individual API(s) - hideOriginPoint, hideDestinationPoint and hideWaypoints() //hides all waypoint, hideWaypoint(point)// hides given waypoint. This gives more control as a user to hide only one of these markers, vs now hideOriginAndDestinationPoints hides both origin and destination, even though the request is to only hide origin.

abhishek1508 avatar Aug 23 '22 11:08 abhishek1508

The waypoints are on the same map layer so they can't be hidden separately with the current implementation.. There is the possibility of creating additional layers with the waypoints separated but this is more significant which is why I suggested pursing the waypoints API suggestion.

cafesilencio avatar Aug 23 '22 15:08 cafesilencio

waypoints API suggestion Would this be a class dedicated to waypoints in a similar manner to the RouteLine and RouteArrows classes?

In addition to origin, final destination, and destinations in-between. We'll likely also provide a way to distinguish waypoints added by the Directions API that aren't explicitly requested (EV Routing).

We will probably also want to provide an API to style waypoints on any metadata that the Directions API may return in the future.

dudeuter avatar Aug 25 '22 23:08 dudeuter