Skip to content

Commit e3aa974

Browse files
committed
Add signals for stop sign and yield sign.
1 parent 5fe5f65 commit e3aa974

File tree

10 files changed

+84
-3
lines changed

10 files changed

+84
-3
lines changed

Sources/MapboxNavigation/NavigationMapView+Annotations.swift

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,19 +419,28 @@ extension NavigationMapView {
419419
if let trafficSignlaDay = Bundle.mapboxNavigation.image(named: "TrafficSignalDay") {
420420
try style.addImage(trafficSignlaDay, id: ImageIdentifier.trafficSignal)
421421
}
422-
423422
if let railroadCrossingDay = Bundle.mapboxNavigation.image(named: "RailroadCrossingDay") {
424423
try style.addImage(railroadCrossingDay, id: ImageIdentifier.railroadCrossing)
425424
}
426-
425+
if let yieldSignDay = Bundle.mapboxNavigation.image(named: "YieldSignDay") {
426+
try style.addImage(yieldSignDay, id: ImageIdentifier.yieldSign)
427+
}
428+
if let stopSignDay = Bundle.mapboxNavigation.image(named: "StopSignDay") {
429+
try style.addImage(stopSignDay, id: ImageIdentifier.stopSign)
430+
}
427431
} else {
428432
if let trafficSignalNight = Bundle.mapboxNavigation.image(named: "TrafficSignalNight") {
429433
try style.addImage(trafficSignalNight, id: ImageIdentifier.trafficSignal)
430434
}
431-
432435
if let railroadCrossingNight = Bundle.mapboxNavigation.image(named: "RailroadCrossingNight") {
433436
try style.addImage(railroadCrossingNight, id: ImageIdentifier.railroadCrossing)
434437
}
438+
if let yieldSignNight = Bundle.mapboxNavigation.image(named: "YieldSignNight") {
439+
try style.addImage(yieldSignNight, id: ImageIdentifier.yieldSign)
440+
}
441+
if let stopSignNight = Bundle.mapboxNavigation.image(named: "StopSignNight") {
442+
try style.addImage(stopSignNight, id: ImageIdentifier.stopSign)
443+
}
435444
}
436445

437446
} catch {
@@ -492,6 +501,12 @@ extension NavigationMapView {
492501
if intersection.railroadCrossing == true {
493502
properties = ["imageName": .string(ImageIdentifier.railroadCrossing)]
494503
}
504+
if intersection.yieldSign == true {
505+
properties = ["imageName": .string(ImageIdentifier.yieldSign)]
506+
}
507+
if intersection.stopSign == true {
508+
properties = ["imageName": .string(ImageIdentifier.stopSign)]
509+
}
495510
if intersection.trafficSignal == true {
496511
properties = ["imageName": .string(ImageIdentifier.trafficSignal)]
497512
}

Sources/MapboxNavigation/NavigationMapViewIdentifiers.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ extension NavigationMapView {
4040
static let routeAnnotationRightHanded = "RouteInfoAnnotationRightHanded"
4141
static let trafficSignal = "traffic_signal"
4242
static let railroadCrossing = "railroad_crossing"
43+
static let yieldSign = "yield_sign"
44+
static let stopSign = "stop_sign"
4345
}
4446

4547
struct ModelKeyIdentifier {
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "StopSignDay.pdf"
6+
}
7+
],
8+
"info" : {
9+
"version" : 1,
10+
"author" : "xcode"
11+
},
12+
"properties" : {
13+
"template-rendering-intent" : "template",
14+
"preserves-vector-representation" : true
15+
}
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "StopSignNight.pdf"
6+
}
7+
],
8+
"info" : {
9+
"version" : 1,
10+
"author" : "xcode"
11+
},
12+
"properties" : {
13+
"template-rendering-intent" : "template",
14+
"preserves-vector-representation" : true
15+
}
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "YieldSignDay.pdf"
6+
}
7+
],
8+
"info" : {
9+
"version" : 1,
10+
"author" : "xcode"
11+
},
12+
"properties" : {
13+
"template-rendering-intent" : "template",
14+
"preserves-vector-representation" : true
15+
}
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "YieldSignNight.pdf"
6+
}
7+
],
8+
"info" : {
9+
"version" : 1,
10+
"author" : "xcode"
11+
},
12+
"properties" : {
13+
"template-rendering-intent" : "template",
14+
"preserves-vector-representation" : true
15+
}
16+
}

0 commit comments

Comments
 (0)