Skip to content

Commit 4f9c95b

Browse files
authored
Add method to update the route line position. (#4030)
1 parent cc92fb5 commit 4f9c95b

File tree

5 files changed

+239
-96
lines changed

5 files changed

+239
-96
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* Fixed an issue where the maneuver arrow is not removed after arriving to the final destination. ([#4040](https://github.com/mapbox/mapbox-navigation-ios/pull/4040))
2121
* Fixed an issue where the destination building is not highlighted after rerouting. ([#4034](https://github.com/mapbox/mapbox-navigation-ios/pull/4034))
2222
* Fixed an issue where the incorrect destination building is highlighted after panning the correct building off screen. ([#4034](https://github.com/mapbox/mapbox-navigation-ios/pull/4034))
23+
* Fixed an issue where the maneuver arrow on the route line overlapped labels for points of interest. ([#4030](https://github.com/mapbox/mapbox-navigation-ios/pull/4030))
2324

2425
### CarPlay
2526

Sources/MapboxNavigation/MapView.swift

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -174,34 +174,6 @@ extension MapView {
174174

175175
return datasets
176176
}
177-
178-
var mainRouteLineParentLayerIdentifier: String? {
179-
var parentLayer: String? = nil
180-
let identifiers = [
181-
NavigationMapView.LayerIdentifier.arrowLayer,
182-
NavigationMapView.LayerIdentifier.arrowSymbolLayer,
183-
NavigationMapView.LayerIdentifier.arrowSymbolCasingLayer,
184-
NavigationMapView.LayerIdentifier.arrowStrokeLayer,
185-
NavigationMapView.LayerIdentifier.waypointCircleLayer,
186-
NavigationMapView.LayerIdentifier.buildingExtrusionLayer
187-
]
188-
189-
for layer in mapboxMap.style.allLayerIdentifiers.reversed() {
190-
if !(layer.type.rawValue == "symbol") && !identifiers.contains(layer.id) {
191-
let sourceLayer = mapboxMap.style.layerProperty(for: layer.id, property: "source-layer").value as? String
192-
193-
if let sourceLayer = sourceLayer,
194-
sourceLayer.isEmpty {
195-
continue
196-
}
197-
198-
parentLayer = layer.id
199-
break
200-
}
201-
}
202-
203-
return parentLayer
204-
}
205177

206178
/**
207179
Method, which returns list of source identifiers, which contain streets tile set.

Sources/MapboxNavigation/NavigationMapView+BuildingHighlighting.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ extension NavigationMapView {
2828
let identifiers = mapView.mapboxMap.style.allLayerIdentifiers
2929
.compactMap({ $0.id })
3030
.filter({ $0.contains("building") })
31-
let layerPosition = identifiers.last.map { LayerPosition.above($0) }
31+
let layerIdentifier = LayerIdentifier.buildingExtrusionLayer
32+
let layerPosition = layerPosition(for: layerIdentifier) ?? identifiers.last.map { LayerPosition.above($0) }
3233

3334
for coordinate in coordinates {
3435
let screenCoordinate = mapView.mapboxMap.point(for: coordinate)

0 commit comments

Comments
 (0)