-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
work in progress user place creation
- Loading branch information
1 parent
80506ef
commit 866031c
Showing
11 changed files
with
111 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// DrawingMixin.swift | ||
// Marlin | ||
// | ||
// Created by Daniel Barela on 3/6/24. | ||
// | ||
|
||
import Foundation | ||
import MapKit | ||
|
||
class DrawingMixin: NSObject, MapMixin { | ||
var uuid: UUID = UUID() | ||
|
||
func setupMixin(mapState: MapState, mapView: MKMapView) { | ||
|
||
} | ||
|
||
func removeMixin(mapView: MKMapView, mapState: MapState) { | ||
|
||
} | ||
|
||
func mapLongPress(mapView: MKMapView, coordinate: CLLocationCoordinate2D) { | ||
// put a marker on the map and then do a query for where they long pressed | ||
// this should show a bottom sheet which will provide actions: | ||
// save as user point, measure, create route, draw more points | ||
// if while drawing, the center of the map is close to a marlin feature | ||
// it will snap to that feature | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// SearchRepository.swift | ||
// Marlin | ||
// | ||
// Created by Daniel Barela on 3/6/24. | ||
// | ||
|
||
import Foundation | ||
import MapKit | ||
|
||
class SearchRepository { | ||
func performSearch( | ||
searchText: String, | ||
region: MKCoordinateRegion? | ||
) async -> [MKMapItem]? { | ||
await withCheckedContinuation { continuation in | ||
switch UserDefaults.standard.searchType { | ||
case .native: | ||
NativeSearchProvider.performSearch(searchText: searchText, region: region) { result in | ||
continuation.resume(returning: result) | ||
} | ||
case .nominatim: | ||
NominatimSearchProvider.performSearch(searchText: searchText, region: region) { result in | ||
continuation.resume(returning: result) | ||
} | ||
} | ||
} | ||
} | ||
} |