views:

41

answers:

1

Hi to all.

I am using the JSON iPhone framework v2.3.1, and I want to query Google Maps about shops, hotels, etc. It is possible to create an URL direction that gives me a list of directions?

Actually I am using this Objective C code.

- (void) searchCoordinatesForAddress {

    //Build the string to Query Google Maps.
    //I don't know how to change this URL direction.
    NSMutableString *urlString = [NSMutableString stringWithFormat:@"http://maps.google.com/maps/geo?q=Paris?output=json"];

    //Replace Spaces with a '+' character.
    [urlString setString:[urlString stringByReplacingOccurrencesOfString:@" " withString:@"+"]];

    //Create NSURL string from a formate URL string.
    NSURL *url = [NSURL URLWithString:urlString];

    //Setup and start an async download.
    //Note that we should test for reachability!.
    NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
    NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];

    [connection release];
    [request release];
}

Thanks for read.

A: 

http://code.google.com/intl/en-EN/apis/maps/index.html

http://code.google.com/intl/es-ES/apis/maps/index.html

Check the spatial search.

Also, if you want to implement a search for stores where you control the list of stores, you might consider using the my maps feature from google. You can upload a list of stores and search that particular list.

Joseph Tura
Hi Joseph Tura, thanks for your response. I had already read the documentation that you link me. Anyway, I can't find where they talk about the queries that I'm talking about, queries that return several results.
Daniel García Baena
Edited my answer. Please check if that helps you.
Joseph Tura