Skip to content

Commit

Permalink
Feat: Location search and show markers #71
Browse files Browse the repository at this point in the history
- Show markers (within 2km nearby marts) but takes 10 sec or more
- Add ErrorAlertMessage for message of UIAlertController
  • Loading branch information
jinios committed Mar 5, 2019
1 parent 9fc9817 commit 82075ef
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
6 changes: 5 additions & 1 deletion MartHoliday/MartHoliday.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
FD2E513B2171E059006E15A6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = FDB26C5D2170711400313A02 /* InfoPlist.strings */; };
FD3B64242121BEAA003C1332 /* ApiGatewayMac.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD3B64232121BEAA003C1332 /* ApiGatewayMac.framework */; };
FD3B64252121BEAA003C1332 /* ApiGatewayMac.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = FD3B64232121BEAA003C1332 /* ApiGatewayMac.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
FD3B64292121BEDD003C1332 /* NMapViewerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD3B64282121BEDD003C1332 /* NMapViewerSDK.framework */; };
FD3B64292121BEDD003C1332 /* NMapViewerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD3B64282121BEDD003C1332 /* NMapViewerSDK.framework */; settings = {ATTRIBUTES = (Required, ); }; };
FD3B642F2122A4FF003C1332 /* NMapViewResources.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD3B642E2122A4FF003C1332 /* NMapViewResources.swift */; };
FD4850F2212843FB0064747A /* SlideMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD4850F1212843FB0064747A /* SlideMenuView.swift */; };
FD4850F4212869AF0064747A /* SlideMenuCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD4850F3212869AF0064747A /* SlideMenuCell.swift */; };
Expand Down Expand Up @@ -70,6 +70,7 @@
FD9654D1217259D800C17D76 /* IndicatorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD9654D0217259D800C17D76 /* IndicatorViewController.swift */; };
FD9F409C211EBFAF007D7F1B /* BranchRawData.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD9F409B211EBFAF007D7F1B /* BranchRawData.swift */; };
FD9F40A0211EC5EA007D7F1B /* Mart.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD9F409F211EC5EA007D7F1B /* Mart.swift */; };
FDA27AF3222E624800610B09 /* POIData.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDA27AF2222E624800610B09 /* POIData.swift */; };
FDA311A9214C141800A7E94B /* BranchRawData.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD9F409B211EBFAF007D7F1B /* BranchRawData.swift */; };
FDA311B2214C14CA00A7E94B /* StarButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD86712221458FCB00273B3C /* StarButton.swift */; };
FDA311B5214C150100A7E94B /* Mart.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD9F409F211EC5EA007D7F1B /* Mart.swift */; };
Expand Down Expand Up @@ -215,6 +216,7 @@
FD9654D0217259D800C17D76 /* IndicatorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IndicatorViewController.swift; sourceTree = "<group>"; };
FD9F409B211EBFAF007D7F1B /* BranchRawData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BranchRawData.swift; sourceTree = "<group>"; };
FD9F409F211EC5EA007D7F1B /* Mart.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Mart.swift; sourceTree = "<group>"; };
FDA27AF2222E624800610B09 /* POIData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = POIData.swift; sourceTree = "<group>"; };
FDAF601B21273E880006B68A /* NanumSquareRoundOTFL.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = NanumSquareRoundOTFL.otf; sourceTree = "<group>"; };
FDAF601C21273E880006B68A /* NanumSquareRoundOTFB.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = NanumSquareRoundOTFB.otf; sourceTree = "<group>"; };
FDAF601D21273E880006B68A /* NanumSquareRoundOTFR.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = NanumSquareRoundOTFR.otf; sourceTree = "<group>"; };
Expand Down Expand Up @@ -372,6 +374,7 @@
FD9F40A1211ECAE2007D7F1B /* Model */ = {
isa = PBXGroup;
children = (
FDA27AF2222E624800610B09 /* POIData.swift */,
FD9F409F211EC5EA007D7F1B /* Mart.swift */,
FD780D76212F185600B569B3 /* SlideMenuManager.swift */,
FD228F372142EB1A0062B75F /* BranchList.swift */,
Expand Down Expand Up @@ -753,6 +756,7 @@
FDC3461D2136708400F6D6FF /* AddressDatum.swift in Sources */,
FD7087DF216B427700A2A16F /* FavoriteData.swift in Sources */,
FDB4BE24211D6BAD00D3B264 /* MartSelectViewController.swift in Sources */,
FDA27AF3222E624800610B09 /* POIData.swift in Sources */,
FDF8ABC4215B76B400DA74C9 /* MainTableViewHeader.swift in Sources */,
FD1B4F232126BBD200946311 /* SlideTopView.swift in Sources */,
FDC5A7432167CD66009F0B0C /* TodayViewController.swift in Sources */,
Expand Down
7 changes: 7 additions & 0 deletions MartHoliday/MartHoliday/Utility/Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ extension UIAlertController {
return alert
}

class func locationErrorAlert() -> UIAlertController {
let alert = UIAlertController(title: ErrorAlertMessage.disableNearbyMarts.title,
message: ErrorAlertMessage.disableNearbyMarts.body,
preferredStyle: .alert)
return alert
}

}

extension UIColor {
Expand Down
4 changes: 4 additions & 0 deletions MartHoliday/MartHoliday/Utility/Keywords.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ enum ProgramDescription: String {
case sorryErrorTitle = "죄송합니다😰"
case networkTimeoutMsg = "서버에 문제가 발생했습니다.\n잠시 후 다시 시도해주세요."
}

struct ErrorAlertMessage {
static let disableNearbyMarts = (title:"위치 검색", body: "마트 위치검색에 문제가 발생했습니다.\n잠시 후 다시 시도해주세요.")
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class LocationSearchViewController: IndicatorViewController, NMapPOIdataOverlayD

mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]

currentState = .tracking
// currentState = .tracking
locationTrackingStateButton = setLocationTrackingButton()
enableLocationUpdate()

Expand Down Expand Up @@ -193,7 +193,7 @@ class LocationSearchViewController: IndicatorViewController, NMapPOIdataOverlayD
mapView?.setMapCenter(userLocation)
// self.fetchNearMarts(from: userLocation)
// self.flag = false
self.toggleTrackingMode()
// self.toggleTrackingMode()
self.userLocation = userLocation
}

Expand Down

0 comments on commit 82075ef

Please sign in to comment.