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

Annotate traffic control devices along the route line

Open 1ec5 opened this issue 3 years ago • 2 comments

The map should mark the location of every traffic control device along the current leg of the route, so that the user can gauge how many controlled intersections remain before the maneuver and what to expect at the maneuver. Specifically, railroad crossings (level crossings), traffic lights, stop signs, and yield signs (give way signs) should all be marked.

Some styles already annotate the location of every railroad crossing and traffic light with a ✖️ or 🚦 icon at high zoom levels, and not just along the route, by filtering the Mapbox Streets source’s road layer to point features whose class is traffic_signals or level_crossing, respectively. We should detect and hide any such layer, because it adds noise during turn-by-turn navigation. The user only needs to know about the traffic control devices along the route, and only if they affect the approach to the intersection that the user would take (a distinction lost in the map tiles).

Once mapbox/mapbox-directions-swift#686 lands, NavigationMapView should have a new method that adds a symbol layer above the route line, backed by a GeoJSON source derived from the intersection data in the route response. We’ll need to supply some built-in icons that the Style subclass can customize. The icons will need to be large enough for the user to notice at a glance, but not so large that they’ll crowd out other important information. We probably shouldn’t attempt to match the style’s aesthetics by reusing the icons from the now-hidden layers. Those icons would be designed to contrast with the road but not necessarily the route line.

/cc @mapbox/navigation-ios @lawsonkight

1ec5 avatar Apr 22 '22 16:04 1ec5

Because https://github.com/mapbox/mapbox-directions-swift/issues/686 has been landed, it's not blocked anymore.

ShanMa1991 avatar Jul 08 '22 18:07 ShanMa1991

/cc @abhishek1508

MaximAlien avatar Jul 11 '22 17:07 MaximAlien