MarkerModelManager
final class MarkerModelManager : MarkerModelManagerProtocol
-
Declaration
Swift
init(markerModelCache: MarkerModelCacheProtocol = MarkerModelCache.shared)
-
local에 데이터가 없다면, server에서 모든 데이터 로드 후 저장 그 후 업데이트 된 내용만 local에 저장
Declaration
Swift
func fetchRawData( completionHandler: @escaping (Result<[AVIROMarkerModel], APIError>) -> Void )
-
가공된 데이터 싱글턴 패턴에 저장
Declaration
Swift
func setAllMarkerModels(with markers: [MarkerModel])
-
가공된 데이터에서 Marer만 불러오기
Declaration
Swift
func getAllMarkers() -> [NMFMarker]
-
Declaration
Swift
func getAllMarkerModel() -> [MarkerModel]
-
앱이 실행 중일때 marker데이터 업데이트 하는 경우
Declaration
Swift
func updateRawDataWhenViewWillAppear( completionHandler: @escaping (Result<[AVIROMarkerModel], APIError>) -> Void )
-
앱 새로고침 후 업데이트 Raw Data를 가공 후 Cache에 데이터 넣기
Declaration
Swift
func updateMarkerModels(with marker: MarkerModel)
-
Declaration
Swift
func updateSelectedMarkerModel(index: Int, model: MarkerModel)
-
Declaration
Swift
func getUpdatedMarkers() -> [NMFMarker]
-
좌표를 통해서 Marker 데이터 불러오기
Declaration
Swift
func getMarkerModelFromCoordinates(lat: Double, lng: Double) -> (MarkerModel?, Int?)
-
Declaration
Swift
func getMarkerModelFromMarker(with marker: NMFMarker) -> (MarkerModel?, Int?)
-
Declaration
Swift
func getMarkerModelFromSerachModel(with searchModel: MatchedPlaceModel) -> (MarkerModel?, Int?)
-
Declaration
Swift
func updateMarkerModelWhenClicked(with markerModel: MarkerModel)
-
Declaration
Swift
func updateMarkerModelWhenOnStarButton(isTapped: Bool, markerModel: [MarkerModel]? = nil)
-
Declaration
Swift
func deleteAllMarker()