Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Initially, to get the map running, you can follow the steps shown in <a href="https://developers.google.com/maps/documentation/ios/intro" rel="nofollow noreferrer">this page</a></p> <p>With <a href="https://developers.google.com/places/documentation/" rel="nofollow noreferrer">Google Places API</a> you can search for nearby places in a given position. Or you can search for locations based on a string.</p> <p>To get your current location, you can see how to do it <a href="https://stackoverflow.com/questions/4152003/how-can-i-get-current-location-from-user-in-ios">here</a>.</p> <p>You dont have to buy anything. Although, Google API has limitations of access. For example, The Google Places only allow you to do 1,000 requests a day. The Google Maps SDK for iOS do not limit the request.</p> <p>Here is a snippet of a code of mine to access the Google Places API.</p> <pre><code>NSString * key = @"PUT YOUR KEY HERE"; NSString * html_msg = [msg stringByReplacingOccurrencesOfString:@" " withString:@"%20"]; NSString * address = [NSString stringWithFormat: @"https://maps.googleapis.com/maps/api/place/textsearch/json?sensor=false&amp;key=%@&amp;query=%@", key, html_msg]; //Create URL and Request NSURL * url = [NSURL URLWithString:address]; NSURLRequest * request = [NSURLRequest requestWithURL:url]; NSURLResponse * response; NSError * error = nil; //Send Request NSData * data = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:&amp;error]; if (error == nil) { //Parse JSON to Dictionary NSDictionary * json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&amp;error]; //Get the lat/lng of the first result [json[@"results"][0][@"geometry"][@"location"][@"lat"] doubleValue]; [json[@"results"][0][@"geometry"][@"location"][@"lng"] doubleValue]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload