Skip to content

Commit 6336db3

Browse files
committed
[Fix] Add AirportBus color, Fix BusStopService radius
1 parent f6b0fc5 commit 6336db3

3 files changed

Lines changed: 46 additions & 3 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0x00",
9+
"green" : "0x9B",
10+
"red" : "0xC7"
11+
}
12+
},
13+
"idiom" : "universal"
14+
},
15+
{
16+
"appearances" : [
17+
{
18+
"appearance" : "luminosity",
19+
"value" : "dark"
20+
}
21+
],
22+
"color" : {
23+
"color-space" : "srgb",
24+
"components" : {
25+
"alpha" : "1.000",
26+
"blue" : "0x00",
27+
"green" : "0x9B",
28+
"red" : "0xC7"
29+
}
30+
},
31+
"idiom" : "universal"
32+
}
33+
],
34+
"info" : {
35+
"author" : "xcode",
36+
"version" : 1
37+
}
38+
}

ComfortableMove/ComfortableMove/Core/Manager/BusStopService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class BusStopService {
1414
private init() {}
1515

1616
/// 위치 기반 주변 정류소 조회
17-
func getNearbyStations(location: CLLocation, radius: Int = 500) async throws -> [StationItem] {
17+
func getNearbyStations(location: CLLocation, radius: Int = 100) async throws -> [StationItem] {
1818
let baseURL = "http://ws.bus.go.kr/api/rest/stationinfo/getStationByPos"
1919

2020
Logger.log(message: "🚏 [API] Searching stations near (\(location.coordinate.latitude), \(location.coordinate.longitude))")

ComfortableMove/ComfortableMove/Core/Model/BusArrivalResponse.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ enum BusRouteType {
3030
case .gwangyeok:
3131
return Color("WideAreaBus")
3232
case .gongHang:
33-
return Color.gray
33+
return Color("AirportBus")
3434
case .unknown:
3535
return Color.gray
3636
}
@@ -64,6 +64,11 @@ enum BusRouteType {
6464

6565
guard length > 0 else { return .unknown }
6666

67+
// 공항버스: 6으로 시작하는 4자리 (6705A 같은 경우도 포함)
68+
if length == 4 && digits.first == "6" {
69+
return .gongHang
70+
}
71+
6772
// 광역버스: 9로 시작하는 4자리
6873
if length == 4 && digits.first == "9" {
6974
return .gwangyeok
@@ -74,7 +79,7 @@ enum BusRouteType {
7479
return .gangseon
7580
}
7681

77-
// 지선버스: 4자리 (9로 시작하지 않음)
82+
// 지선버스: 4자리 (6, 9로 시작하지 않음)
7883
if length == 4 {
7984
return .jiseon
8085
}

0 commit comments

Comments
 (0)