Open abhishek1508 opened 2 years ago
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.
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.
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.
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.
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