Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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))")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ enum BusRouteType {
case .gwangyeok:
return Color("WideAreaBus")
case .gongHang:
return Color.gray
return Color("AirportBus")
case .unknown:
return Color.gray
}
Expand Down Expand Up @@ -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
Expand All @@ -74,7 +79,7 @@ enum BusRouteType {
return .gangseon
}

// 지선버스: 4자리 (9로 시작하지 않음)
// 지선버스: 4자리 (6, 9로 시작하지 않음)
if length == 4 {
return .jiseon
}
Expand Down