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.

The CLGeocoder class provides services for converting between a coordinate (specified as a latitude and longitude) and the user-friendly representation of that coordinate. A user-friendly representation of the coordinate typically consists of the street, city, state, and country information corresponding to the given location, but it may also contain a relevant point of interest, landmarks, or other identifying information. A geocoder object is a single-shot object that works with a network-based service to look up placemark information for its specified coordinate value.

http://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CLGeocoder_class

227 questions
7
votes
3 answers

CLPlacemark.locality, value changes if the device language is different

I uses CLGeocoder to decode the CLLocation from longitude/latitude to place names. It works fine. But there is still one thing bothers me. When i set the device language to English, the result of the code below: -…
David L
  • 569
  • 1
  • 6
  • 16
7
votes
2 answers

iPhone iOS5 CLGeocoder how to geocode a large (200) set of addresses?

I got a large set of about 200 addresses for which I need to know their latitude and longitude. I've created a method that parses the addresses, and now I'm trying to get coordinates for these addresses using CLGeocoder. My current approach is to…
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
6
votes
1 answer

iOS 13 Simulator: reverseGeocodeLocation - [GEOAddressObject] [NSLocale currentLocale] failed for NSLocaleCountryCode@

Whenever I'm calling: reverseGeocodeLocation(_ location: CLLocation, preferredLocale locale: Locale?, completionHandler: @escaping CLGeocodeCompletionHandler) I'm getting in the console: [GEOAddressObject] [NSLocale currentLocale] failed for…
Chris
  • 107
  • 1
  • 10
6
votes
1 answer

Unable to get city name by current latitude and longitude in swift

I'm trying to get city name from my current location coordiate by using CLGeocoder().reverseGeocodeLocation. It gives me country name, street name, state and many other things but not city. Is there anything wrong with my code? Here's my…
Sptibo
  • 281
  • 2
  • 8
  • 22
6
votes
1 answer

CLGeocoder error. GEOErrorDomain Code=-3

When I tried to use reverse geocoding,this error message showed up. Geocode error: Error Domain=GEOErrorDomain Code=-3 "(null)" My code is below: import CoreLocation geocoder.reverseGeocodeLocation(location) { (placemarks, error) in if let…
Akisazaki RIn
  • 75
  • 2
  • 6
6
votes
1 answer

CLGeocoder reverse geocoding fails with Error Domain=NSURLErrorDomain Code=-1000 -

With a CLLocation object (content e.g. latitude = 48.196169, longitude = 11.620237), I try to get the current city and country like: if(!geocoder) { geocoder = [[CLGeocoder alloc] init]; } if (geocoder.geocoding) [geocoder cancelGeocode]; …
Adrian
  • 524
  • 5
  • 21
6
votes
1 answer

How to get latitude longitude using Zip code/ Postal Code using CLGeoCoder in iOs?

I'm new to Objective-C programming. I want to display location in MapView by Zip code / Postal Code. For that i have to find the latitude and longitude. I had already referred many solutions by passing zip-code to web-service and getting response…
Nirav Valera
  • 420
  • 4
  • 13
5
votes
2 answers

geocodeAddressString not working for swift

Hi I am trying to use geocodeAddressString to convert the address to a placemark on the map, but whatever address I passed to this method, the below block will never be executed, could anyone give me some light? Thanks a lot By the way, I can see…
Paddy Wang
  • 51
  • 1
  • 3
5
votes
1 answer

CLGeocoder reverseGeocodeLocation is returning placemark with different lat/long? (playground example attached)

Why does CLGeocoder reverseGeocodeLocation return a placemark with different lat/long when it looks up address? Background: In terms of a user "long pressing" on the map to drop a pin, but my code reverse Geocoding this to be able to put an area…
Greg
  • 34,042
  • 79
  • 253
  • 454
5
votes
4 answers

geocoder.geocodeAddressString no longer works with swift update today

https://developer.apple.com/library/prerelease/mac/releasenotes/General/APIDiffsMacOSX10_11/Swift/CoreLocation.html shows that there were a couple of changes func geocodeAddressString(_ addressString: String!, completionHandler completionHandler:…
Jason G
  • 2,395
  • 2
  • 24
  • 34
5
votes
3 answers

CLGeocoder: US state Names are coming as a short codes

I am developing app in iOS 8.0. By below link, I am assigning the location object, How can I get current location from user in iOS My aim is to find out City, State and Country name, By current location. Using answer of this link, I am getting the…
Arpit B Parekh
  • 1,932
  • 5
  • 36
  • 57
5
votes
2 answers

Multiple Locations on Map (using MKMapItem and CLGeocoder)

I'm trying to display multiple locations in MKMapItem. I am getting those locations from a CLGeocoder, unfortunately it only accepts one location. Even though I pass in an NSArray it just returns one location. The following works fine with a single…
Grey Code
  • 326
  • 5
  • 19
4
votes
1 answer

Forward Geocode Example using CLGeocoder

A directions to a working example or some guidance on how to use the forward geocoding beside the Apple Documentation. Thats pretty generic (i cant understand) Please this would be great! Also does anyone know if they are using Google API to achieve…
carbonr
  • 6,049
  • 5
  • 46
  • 73
4
votes
1 answer

CLGeocoder geocodeAddressString() hitting the limit

Im using MapKit's CLGeocoder().geocodeAddressString() to get the coordinates and county information for a list of addresses. Everything works great as long as the # of requests is under 50. but anything over 50 and im hitting API's limit. Since…
4
votes
2 answers

Why can I only reverse geocode location that are inside China?

I use Apple's CLGeocoder and when I retrieve placemark's address dictionary it is as expected for locations inside China, but empty for requests in other countries. Isn't CLGeocoder supposed to work worldwide? Here is what I get when I print…
PeYoTlL
  • 3,144
  • 2
  • 17
  • 18
1
2
3
15 16