title: Fetching nearby places using google maps
body: <p>Am trying to implement to find nearby places of my current location using google maps.
  I have created a project in Google Developer Console and got 'ios APIkey' and 'Server APIkey'. I also enabled Google Places API and Google Maps SDK for iOS.
  Below is the code to find out near by places.</p>
  
  <pre><code>func fetchPlacesNearCoordinate(coordinate: CLLocationCoordinate2D, radius: Double, name : String){
      var urlString = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=\(apiServerKey)&amp;location=\(coordinate.latitude),\(coordinate.longitude)&amp;radius=\(radius)&amp;rankby=prominence&amp;sensor=true"
      urlString += "&amp;name=\(name)"
  
      urlString = urlString.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding)!
      println(urlString)
      if placesTask.taskIdentifier &gt; 0 &amp;&amp; placesTask.state == .Running {
          placesTask.cancel()
  
      }
      UIApplication.sharedApplication().networkActivityIndicatorVisible = true
      placesTask = session.dataTaskWithURL(NSURL(string: urlString)!) {data, response, error in
          println("inside.")
          UIApplication.sharedApplication().networkActivityIndicatorVisible = false
          if let json = NSJSONSerialization.JSONObjectWithData(data, options:nil, error:nil) as? NSDictionary {
              if let results = json["results"] as? NSArray {
                  for rawPlace:AnyObject in results {
                      println(rawPlace)
                      self.results.append(rawPlace as! String)
                  }
              }
          }
              self.placesTask.resume()
      }
  }
  </code></pre>
  
  <p>The passed coordinate is current location's coordinate. If I execute a above code, nothing is happening but generated url is valid one. If i put that url in Google am getting correct results. But nothing displaying in my app. Please help me to resolve this. and please let me know where am wrong!!! </p>