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
4
votes
1 answer

List of Apple's reverse geocode countries

I'm using Swift to do a reverse geocode on a device's location, getting the country. Then finding the index of that country in an array and scrolling to that index in my UITableView. My problem is, I can't find a list of the country names Apple…
Byron Coetsee
  • 3,533
  • 5
  • 20
  • 31
4
votes
1 answer

Why doesn't forward geocoding with CLGeocoder.geocodeAddressString work in the playground?

I'm attempting to geocode a string into a lat/lon in the swift playground. Here is my code: import CoreLocation var geocoder = CLGeocoder() geocoder.geocodeAddressString("San Francisco, CA", {(placemarks, error)->Void in …
Zain
  • 639
  • 1
  • 7
  • 13
4
votes
2 answers

CLGeocoder reverse geocode from given location

Given a longitude and latitude not my current location how can I perform a reverse geocode lookup using GLGeocoder? self.geoCoder = [[CLGeocoder alloc] init]; self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate =…
James
  • 5,137
  • 5
  • 40
  • 80
3
votes
1 answer

Updating MKMapView to CLPlacemark returned from CLGeocoder

I want to be able to update the region displayed on a MKMapView by allowing the user to type in an address or location in a UIAlertView. I currently have: if (geocoder.geocoding) [geocoder cancelGeocode]; [geocoder…
brendan
  • 1,705
  • 1
  • 18
  • 24
3
votes
1 answer

Issue forward-geocoding multiple addresses

I am connecting to a remote web service which basically returns an XML back. I am then parsing that XML into a Property object (think real state sort of thing) But now, the web service returns a postal code for each property alone. It does not…
MrShoot
  • 843
  • 1
  • 9
  • 21
3
votes
2 answers

Apple CLGeocoder,MKLocalSearch result differ from device map result

In my application search with the location string, it ll return the 5 result, but that not match with default device map app. my code 1 : CLGeocoder CLGeocoder *geocoder = [[CLGeocoder alloc] init]; [geocoder geocodeAddressString:searchKey…
Ammaiappan
  • 539
  • 3
  • 22
3
votes
1 answer

CLGeocoder in Swift - unable to return string when using reverseGeocodeLocation

I'm attempting to use CLGeocoder to return the location of coordinates in a string. My code currently looks like this: func getPlaceName(latitude: Double, longitude: Double) -> String { let coordinates = CLLocation(latitude: latitude, longitude:…
Adam Johnson
  • 673
  • 9
  • 18
3
votes
1 answer

iOS - CLGeocoder without internet connection

I am using CLGeocoder to locate adresses on a map and calculate the user's distance in comparison to a whole bunch of adresses. Here is the part of the code that uses CLGeocoder: CLGeocoder *geocoder = [[CLGeocoder alloc] init]; __block float…
el-flor
  • 1,466
  • 3
  • 18
  • 39
3
votes
1 answer

CLPlacemark crash in Swift

I'm using CLGeocoder for reverse geolocation and get array of CLPlacemark. When I use GPS outside the US (i.e. -27,127) and then access placemark.postalCode, the app crashes with: "fatal error: unexpectedly found nil while unwrapping an Optional…
VojtaStavik
  • 2,312
  • 1
  • 18
  • 30
3
votes
1 answer

Setting MKMapView Zoom level to a locality

I wish to set the zoom level (OR set region) of MKMapView such that I can show a locality. Elaborating my context with an example. I have a location (CLLocation *) of which I found out the locality using CLGeocoder (reverse geocoding). Now, say the…
Deborshi Saha
  • 224
  • 5
  • 21
3
votes
1 answer

MKDirectionsResponse: error, Directions not available. (USA)

For learning purposes I'm trying to develop an app which will show directions to a specific point on a MKMapView. However, the DirectionsResponse gives me the following error everytime, no matter the address: 2013-12-28 17:52:23.100…
vincent kleine
  • 724
  • 1
  • 6
  • 22
3
votes
1 answer

Show address in annotation when pin is dropped on map

Currently I can drop pins around the map. Now I want the annotation title to display the address of where the pin is dropped. I've had a look at this but cant get mine to work: Set annotation's title as current address Code in my…
Ernie
  • 89
  • 1
  • 11
3
votes
2 answers

CLGeocoder reverseGeocodeLocation "kCLErrorDomain error 2"

I'm developing an iOS app with reverse geocoding features. When I call the function the first time everything is fine. After the second call (with a new instance of the controller where the call is done) the "Domain=kCLErrorDomain Code=2" Error…
dalipsia
  • 186
  • 1
  • 7
3
votes
1 answer

Need more coordinates from CLGeocoder than the limit

following code is returning me coordinates only for first 10 addresses. But i need more than 100 to store that in a database. is there a limit of geocoder? how can i do it ? for(int i=0;i
Will Smith
  • 339
  • 1
  • 4
  • 13
3
votes
2 answers

iOS: ReverseGeocoding Using CLGeocoder Vs. Google Geocoder API

I am building an iOS application that in one of its functions implements reverse geocoding for obtaining street addresses from user gesture tap on a map. When running the app using CLGeocoder's reverse geocoding features, I was only able to get the…
alandalusi
  • 1,145
  • 4
  • 18
  • 39
1 2
3
15 16