You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the user drives down a road that has a named footpath or bike path running alongside it, the current road name label can display that path’s name instead of the road’s. The SDK queries the map based on a location snapped to the route line, so normally it would be fine if some other kind of pathway runs alongside the roadway. But an incorrect result could still occur if the user has deviated far enough from the route that snapping ceases, but not far enough that the user gets rerouted, or if they’ve driven past the destination.
RouteMapViewController.labelCurrentRoad(at:for:) lays down a line layer bound to the Streets source and ensures that it gets obscured by the original style’s own road layers:
The line style layer needs to have a source layer of road (to avoid snagging other named features like rivers). The layer should also have a filter that requires class to be an appropriate value. The set of appropriate values depends on the current route step’s mode, as seen in mapbox/mapbox-navigation-android#2227 (comment).
/cc @mapbox/navigation-ios
The text was updated successfully, but these errors were encountered:
@avi-c discovered that the lack of filtering also results in very poor performance in areas with lots of overlapping non-roads on the map, such as in urban areas of Japan.
When the user drives down a road that has a named footpath or bike path running alongside it, the current road name label can display that path’s name instead of the road’s. The SDK queries the map based on a location snapped to the route line, so normally it would be fine if some other kind of pathway runs alongside the roadway. But an incorrect result could still occur if the user has deviated far enough from the route that snapping ceases, but not far enough that the user gets rerouted, or if they’ve driven past the destination.
RouteMapViewController.labelCurrentRoad(at:for:)
lays down a line layer bound to the Streets source and ensures that it gets obscured by the original style’s own road layers:mapbox-navigation-ios/MapboxNavigation/RouteMapViewController.swift
Lines 648 to 655 in 4ae1d62
The line style layer needs to have a source layer of
road
(to avoid snagging other named features like rivers). The layer should also have a filter that requiresclass
to be an appropriate value. The set of appropriate values depends on the current route step’s mode, as seen in mapbox/mapbox-navigation-android#2227 (comment)./cc @mapbox/navigation-ios
The text was updated successfully, but these errors were encountered: