diff --git a/ComfortableMove/ComfortableMove/App/Resources/Assets.xcassets/Color/AirportBus.colorset/Contents.json b/ComfortableMove/ComfortableMove/App/Resources/Assets.xcassets/Color/AirportBus.colorset/Contents.json new file mode 100644 index 0000000..52d5faa --- /dev/null +++ b/ComfortableMove/ComfortableMove/App/Resources/Assets.xcassets/Color/AirportBus.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0x9B", + "red" : "0xC7" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0x9B", + "red" : "0xC7" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ComfortableMove/ComfortableMove/Core/Manager/BusStopService.swift b/ComfortableMove/ComfortableMove/Core/Manager/BusStopService.swift index df2e465..d5d692b 100644 --- a/ComfortableMove/ComfortableMove/Core/Manager/BusStopService.swift +++ b/ComfortableMove/ComfortableMove/Core/Manager/BusStopService.swift @@ -14,7 +14,7 @@ class BusStopService { private init() {} /// 위치 기반 주변 정류소 조회 - func getNearbyStations(location: CLLocation, radius: Int = 500) async throws -> [StationItem] { + func getNearbyStations(location: CLLocation, radius: Int = 100) async throws -> [StationItem] { let baseURL = "http://ws.bus.go.kr/api/rest/stationinfo/getStationByPos" Logger.log(message: "🚏 [API] Searching stations near (\(location.coordinate.latitude), \(location.coordinate.longitude))") diff --git a/ComfortableMove/ComfortableMove/Core/Model/BusArrivalResponse.swift b/ComfortableMove/ComfortableMove/Core/Model/BusArrivalResponse.swift index 7c49ee8..af030fb 100644 --- a/ComfortableMove/ComfortableMove/Core/Model/BusArrivalResponse.swift +++ b/ComfortableMove/ComfortableMove/Core/Model/BusArrivalResponse.swift @@ -30,7 +30,7 @@ enum BusRouteType { case .gwangyeok: return Color("WideAreaBus") case .gongHang: - return Color.gray + return Color("AirportBus") case .unknown: return Color.gray } @@ -64,6 +64,11 @@ enum BusRouteType { guard length > 0 else { return .unknown } + // 공항버스: 6으로 시작하는 4자리 (6705A 같은 경우도 포함) + if length == 4 && digits.first == "6" { + return .gongHang + } + // 광역버스: 9로 시작하는 4자리 if length == 4 && digits.first == "9" { return .gwangyeok @@ -74,7 +79,7 @@ enum BusRouteType { return .gangseon } - // 지선버스: 4자리 (9로 시작하지 않음) + // 지선버스: 4자리 (6, 9로 시작하지 않음) if length == 4 { return .jiseon }