Skip to content

Annotate traffic control devices along the route line #3843

Closed
@1ec5

Description

@1ec5

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions