How to pass the latitude and longitude values to the ns url as a arguments?
<p>Iam developing one application.In that i use the google api for getting the location information.For that i use the CLLocationManager for getting the location latitude and longitude values.And my pblm is how to pass these latitude and longitude values to nsurl .ANd iam directly given the one location values to the url like below.</p>

<pre><code> NSURL *URL = [NSURL URLWithString:@"https://maps.googleapis.com/maps/api/place/search           /json?location=40.7143528,-74.0059731&amp;radius=10000&amp;types=school&amp;sensor=false&amp;key=AIzaSyDbiWWIOmc08YSb9DAkdyTWXh_PirVuXpM"];
</code></pre>

<p>I write this one in below method for get and pass the latitude and longitude values.</p>

<pre><code>   - (void)locationManager:(CLLocationManager *)manager
    didUpdateToLocation:(CLLocation *)newLocation
           fromLocation:(CLLocation *)oldLocation
{
}
</code></pre>

<p>So please tell me how to pass the newlocation.Coordinates.latitude and newlocation.Coordinates.longitude to that url in that method.</p>

<p>With others suggestions i changed the code like below.</p>

<pre><code>    - (void)locationManager:(CLLocationManager *)manager
    didUpdateToLocation:(CLLocation *)newLocation
           fromLocation:(CLLocation *)oldLocation
{

    NSString *address = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/place/search/json?location=%f, %f&amp;radius=10000&amp;types=school&amp;sensor=false&amp;key=AIzaSyDbiWWIOmc08YSb9DAkdyTWXh_PirVuXpM", newLocation.lattitude, newLocation.longitude];
    NSURL *url = [NSURL URLFromString:address];
}
</code></pre>

<p>This also gives the error like Exe_Bad_Access when the first line executed.SO please tell me how to write that one.</p>
