13

I'm drawing routes on google map and just realized it all works fine except I send coordinates of somewhere in Korea.(South to be precise)

JSON data is null even though the coordinates are correct and keeps "zero results"'ing me.

I've tried Africa, Australia, Europe and even China and Japan but anywhere in Korea won't work.

Am I missing something here..?

EDIT

So I guess it's not just Korea Mongolia and Indonesia are the same their geocodes don't work with waypoints to get the route.

Comparing results between Korea and Germany -

Korea

{"geocoded_waypoints" : [
  {
     "geocoder_status" : "OK",
     "place_id" : "ChIJzWXFYYuifDUR64Pq5LTtioU",
     "types" : [ "locality", "political" ]
  },
  {
     "geocoder_status" : "OK",
     "place_id" : "ChIJNc0j6G3raDURpwhxJHTL2DU",
     "types" : [ "locality", "political" ]
  }],"routes" : [],"status" : "ZERO_RESULTS"}

Germany

{"geocoded_waypoints" : [
  {
     "geocoder_status" : "OK",
     "place_id" : "ChIJAVkDPzdOqEcRcDteW0YgIQQ",
     "types" : [ "locality", "political" ]},
  {
     "geocoder_status" : "OK",
     "place_id" : "ChIJ2V-Mo_l1nkcRfZixfUq4DAE",
     "types" : [ "locality", "political" ]}],"routes" : [
  {
     "bounds" : {
        "northeast" : {
           "lat" : 52.5200138,
           "lng" : 13.404945
        },
        "southwest" : {
           "lat" : 48.1351972,
           "lng" : 11.1954806
        }
     },
     "copyrights" : "Datos de mapas ©2015 GeoBasis-DE/BKG (©2009), Google",
     "legs" : [
        {
           "distance" : {
              "text" : "585 km",
              "value" : 584740
           },

And so on and on. As you see you get full data with german coordinates.

EDIT

Ok..CLLocationManager does the same thing... How am I supposed to get addresses in those countries??

fantaghirocco
  • 4,761
  • 6
  • 38
  • 48
durazno
  • 559
  • 2
  • 7
  • 25
  • Can you clarify what results you are usually getting/expecting? – Pekka Aug 24 '15 at 18:49
  • 1
    I send latitude/longitude of start/end points and then draw routes between two points. It works with most countries but does not with a few countries and I'm not entirely sure whether that's just the way it is, meaning that they just have strong restrictions and I just can't make it OR I'm doing something wrong. – durazno Aug 24 '15 at 18:54
  • What data are you getting in other countries exactly that you aren't getting in Korea or Mongolia? – Pekka Aug 24 '15 at 18:56
  • I get empty JSON data with status = ZERO RESULTS. Doesn't happen with the most countries tho. But the ones that don't work, never work no matter what part of the country. – durazno Aug 24 '15 at 18:58
  • @duranzo - I just tried Korea using google's reverse geocode service and it worked fine for some random coordinates in South Korea, can you specify what data doesn't work? My example coords are : 37.532600,127.024612 – Idiot211 Sep 02 '15 at 10:36
  • I can find a place with coordinates that's no issue. The issue is to get address or distance between a place and somewhere in above mentioned countries or estimated time of arrival by walking etc. I can only locate a spot, not able to get information. **Actually** a couple of days ago I found an article about Google trying to convince Korea to let people share info using Google Maps.. so I guess that explains how I'm just supposed to let users know that it isn't available due to restrictions whenever user tries to get routes in those countries..? What else can I do? – durazno Sep 02 '15 at 10:59
  • 4
    Apparently, Korea imposes several restrictions to use of maps on internet: > Google is pressuring South Korea to ease up on regulations that make > it impossible for the company to offer driving directions through > Google Maps > from **The Verge** http://www.theverge.com/tech/2013/10/13/4835026/why-google-cant-give-you-driving-directions-in-south-korea More details: http://www.nytimes.com/2013/10/14/business/international/google-jousts-with-south-koreas-piecemeal-internet-rules.html?_r=0 []'s – Uilian Sep 02 '15 at 18:37
  • I'd really like to know how some apps provide route directions in Korea. Seriously can't find anything on that. – durazno Sep 02 '15 at 20:29
  • I'm pretty sure that many countries in the Middle East, Africa, Northern Europe, Korea, and some areas in Asia actually do not have any information. You cannot find routes through them. I was playing around by trying to find the longest distance walkable, so I tried to walk to Cape Town from Europe through the Middle East, and it couldn't calculate it. I really don't see why though. I think you're right about what your problem is. @durazno – Daniel Li Sep 03 '15 at 02:24
  • The thing is on their Korean website they claim to have functional route direction service in Korea. I'm so very confused. – durazno Sep 03 '15 at 02:36

1 Answers1

2
{
- (void)mapView:(GMSMapView *)mapView idleAtCameraPosition:(GMSCameraPosition *)position
{
    CLLocation *pinLocation =[[CLLocation alloc] initWithLatitude:position.target.latitude  longitude:position.target.longitude];

CLGeocoder *geocoder = [[CLGeocoder alloc] init];
[geocoder reverseGeocodeLocation:pinLocation
               completionHandler:^(NSArray *placemarks, NSError *error)
 {
     if (error)
     {
         return;
     }
     CLPlacemark *placemark = [placemarks objectAtIndex:0];
     NSLog(@"address-->%@",placemark.addressDictionary);

}];

Rich Benner
  • 7,873
  • 9
  • 33
  • 39