Questions tagged [clgeocoder]
The CLGeocoder class provides services for converting between a coordinate (specified as a latitude and longitude) and the user-friendly representation of that coordinate.
clgeocoder
228
questions
0
votes
0
answers
38
views
Different CLGeocoder results between device and simulator. Why might this happen?
I am using the following code to get a Placemark (and coordinates) from a city name, both for mapping and current weather information.
When I run my application on a iPhone 15 Pro Max (in the ...
1
vote
1
answer
54
views
withTaskGroup does not work with CLGeocoder
I need to implement search functionality for addresses based on user input. For address suggestions I am using MKLocalSearchCompleter. After suggestions are retrieved I need to get placemarks based on ...
0
votes
0
answers
44
views
Can't get updated location using custom class
I create a custom LocationManager so I can just use that object to get the location of the user anywhere in the app, but It seems like I can't get the location using the object that I created, here's ...
-2
votes
2
answers
114
views
How do I get the results from an @escaping closure to not disappear
I'm trying to create a function that takes a postalCode and passes back the city, state, and country. The function finds the results and they can be printed from the calling closure; however, when I ...
-1
votes
1
answer
288
views
CLGeocoder region specific Error Domain=kCLErrorDomain Code=8 "(null)"
I have a query regarding clgeocoder apis , basically in our app we have a provision to add address manually by user by giving region, city and place details etc; when I try to fetch lat long values ...
0
votes
1
answer
326
views
Domain=kCLErrorDomain Code=8 when fetching location through zipcode
I'm trying to fetch the the latitude and longitude based on the input parameters postal/city and country code. Below is my code, this works fine if enter City and country name but shows error if I ...
3
votes
2
answers
752
views
Flutter Geocoding iOS locationFromAddress always return empty list
I'm using the function locationFromAddress from plugin https://pub.dev/packages/geocoding. sending the same info (address, city) in both Android and iOS, android return the right coordinates(lat, long)...
2
votes
4
answers
627
views
Swift CLGeocoder to get TimeZone
I'm afraid I likely have the completion handler all messed up. What I am trying to do is use latitude and longitude to get a TimeZone. I want the entire function to return the value with a type ...
0
votes
2
answers
405
views
How to wait until CLGeocoder finish its work
I have following function geocoding address from GPS coordinates
private func getAddressFromLocation(forLocation: CLLocationCoordinate2D) {
let geoCoder = CLGeocoder()
geoCoder....
0
votes
0
answers
31
views
current location alway 00000.00, 00000.00 [duplicate]
I am trying to get my current location and the reverseGeoCode it for an address but I keep getting my location as long 00000.00 and lat 00000.00
Here is my code
locationManager = [[CLLocationManager ...
0
votes
1
answer
114
views
MapKit forward geocoding that is not based on ONLY addresses?
So I made a super simple forward geocoding function with MapKit:
func getCoordinates(from address: String) {
CLGeocoder().geocodeAddressString(address) { placemark, error in
guard error == ...
0
votes
1
answer
1k
views
SwiftUI How to toggle a Bool in a Struct from an ObservableObject class and show alert to notify user
I have a method in my class that opens a map when given an address string. Trying to show an alert in a view by toggling a boolean in a method in the class. I can't figure out how to toggle the ...
0
votes
1
answer
546
views
CLGeocoder().geocodeAddressString error codes
I am working on a project where I use CLGeocoder to determine the placemarks for a particular location.
Very simple call like this.
CLGeocoder().geocodeAddressString(location) { (placemarks, error) in
...
0
votes
1
answer
279
views
CLLocationManager() requestWhenInUseAuthorization() shows up and disappears on simulator and does not show up on actual device
I want to know the user's current location. But since I want to get this location from multiple places, I made a function for it instead of setting a particular UIViewController as delegate handler.
...
-2
votes
1
answer
112
views
Having trouble putting in the coordinates in global variable [CLgeocoder, swift4]
I am trying to create an app that will find the sunrise time and I am using this web API that requires both coordinates of the location.
This is my solution for to get the latitude and longitude but ...